In my repo, I have a master branch and a new branch.
I have been working on new for some time, committing and pushing when I go. Now I decided to disable new and name it newest . Therefore i did
git checkout -b "newest"
and the branch was successfully created. I added the file and started working on it. I made my changes a couple of times.
BUT, when I try to push this new branch and my changes to its origin , I get this error:
C:\wamp\www\myproj>git push origin To https://github.com/Imray/Proj.git ! [rejected] master -> master (non-fast-forward) ! [rejected] new -> new (non-fast-forward) error: failed to push some refs to 'https://github.com/Imray/Proj.git' hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. Check out this branch and integrate the remote changes hint: (eg 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
So, as indicated in the instructions, I tried git pull , but then I got:
There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details git pull <remote> <branch> If you wish to set tracking information for this branch you can do so with: git branch
I am stuck.
How do I push my new branch and changes on github ?
source share