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! While you're at it, check out some resources Treehouse students have shared here.

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 GitHub in Workspaces

Rachel Xie
Rachel Xie
5,824 Points

error when try to push from workspace into GitHub repository

When I trying to push my codes in workspace into GitHub, I get the error below. It's right after I typing my username and user password of GItHub. And i've researched around at Google, still get confused.

Thank you very much for helping:

treehouse:~/workspace/JavaScript$ git push --help
warning: failed to exec 'man': No such file or directory
fatal: no man viewer handled the request
treehouse:~/workspace/JavaScript$ git push -u origin master
Username for 'https://github.com': rachelxie1985
Password for 'https://rachelxie1985@github.com':
To https://github.com/rachelxie1985/JavaScriptBasics.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/rachelxie1 985/JavaScriptBasics.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another reposit ory pushing
hint: to the same ref. You may want to first merge the remote cha nges (e.g.,
hint: 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

2 Answers

__ROLLER__ Angel
__ROLLER__ Angel
25,606 Points

Hello,

You're getting a conflict. Conflict Resolution is explained in the following video Conflict Resolution

In the video they go over the steps to resolve the issue you've run into so I suggest you watch that video and follow the instructions.

Rachel Xie
Rachel Xie
5,824 Points

Wow, thank you sooooo much. It solves my problem perfectly~!!!