Reputation: 375
I created a new branch using Gitlab GUI. I opened up my git bash and ran git branch, but the newly created branch won't appear there. How do I push my latest commit to the newly created branch now?
Upvotes: 2
Views: 1733
Reputation: 719
Force to pull the latest:
git fetch origin
If you create one named recentUIbranch on the UI, you will see:
* [new branch] <recentUIbranch> -> origin/<recentUIbranch>
Jump into the branch:
git checkout -b <recentUIbranch>
You can now do some changes on that branch.
When you push:
git push --set-upstream origin <recentUIbranch>
Upvotes: 3