I have a repo and I'd like to push to the develop
branch.
I have used
$ git checkout develop
Already on 'develop'
Your branch is up-to-date with 'origin/develop'.
And also done git pull
of the develop
branch.
I expect
$ git push
To push to the develop branch. But that isn't what's happening.
djave at djave-comp in ~/projects/project on develop*
$ git push
Counting objects: 49, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (49/49), done.
Writing objects: 100% (49/49), 25.45 KiB | 0 bytes/s, done.
Total 49 (delta 38), reused 0 (delta 0)
To bitbucket.org:djave/project.git
f311657..16b42c7 develop -> develop
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'djave@bitbucket.org:djave/project.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: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
It looks like it is pushing to develop
:
f311657..16b42c7 develop -> develop
But then is also trying to push to the master
branch (and fails):
! [rejected] master -> master (non-fast-forward)
I expect it to just push to the develop
branch and be successful.
How can I make git push just push to the develop
branch?
Sorry if this is a duplicate (have searched extensively but can't find the right combination of issues) or the title doesn't use the correct terminology (feel free to update the title)