I keep running into this same issue when I try and push up a new remote branch to github and Im not sure how to handle it. This is whats happening:
- I create a branch for example
git checkout -b feature/5110
- Make my changes to that branch
- Commit those changes
git add .
git commit -m "made changes"
- Then I checkout to my develop branch
git checkout develop
(if for one reason or another I am unable to push at that time) - When I return to that branch
git checkout feature/5110
I try and pushgit push
- I get the message :
To push the current branch and set the remote as upstream, use
`git push --set-upstream origin feature/5110`
- So I run
git push --set-upstream origin feature/5110
- Then I get the error :
fatal: feature/5110 cannot be resolved to branch.
The only way ive found to work around this is to delete my branch and start over which is not effective now that I'm making larger changes. Can anyone tell me whats happening and how to resolve?