Reputation: 538
I have a master branch and a development branch. I'm currently in my development branch.
When I do git push
I get the following suggestions:
fatal: The upstream branch of your current branch does not match the name of your current branch. To push to the upstream branch on the remote, use
git push origin HEAD:master
To push to the branch of the same name on the remote, use
git push origin development
So I type git push origin development
to push to the development branch. But I simple want to type git push
to push to the current branch (development).
When I type git status
I get this message:
Your branch is ahead of 'origin/master' by 26 commits.
So I did a pull request from development to master and merge the development branch into the master branch. But I still get the message "Your branch is ahead of ... ".
What am I doing wrong over here?
Thanks
Upvotes: 0
Views: 375
Reputation: 95652
When you created your development branch you somehow set it to track origin/master
instead of origin/development
.
Run git branch -vv
to see your branches and which upstream branches they are tracking.
You can correct the upstream setting for the development branch with:
git branch --set-upstream-to=origin/development development
Upvotes: 2