CodeSadhu
CodeSadhu

Reputation: 375

New branch from gitlab won't appear in git bash

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

Answers (1)

nandilov
nandilov

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

Related Questions