Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Introduction to Git GitHub and Other Remote Repositories Adding Remotes

so I keep getting these issues when I go to commit a repo to git??

distj@DESKTOP-2RJ0VPK MINGW64 ~/Desktop/DEsktop/resources/treehouse/16.Javascript/projects/jsForm (master) $ git push -u origin master To https://github.com/DJSandsCreation/DJS-JSformValidation.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/DJSandsCreation/DJS-JSformValidation.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

1 Answer

Clayton Perszyk
Clayton Perszyk
Treehouse Moderator 48,695 Points

it's saying you need to do a git pull before pushing to integrate remote changes into your local changes. git pull will merge remote code into yours; this may cause a merge conflict, if local and remote have changes to same files/lines of code.