Reputation: 37
My task is to commit somethings to other remote branch(not master) in gitlab. I have created another active remote branch name as Dennis (where the remote branch I want to commit to it) on the gitlab repository's branches part. However, it does not show the remotes/origin/Dennis branch in the terminal. How I have remotes/origin/Dennis inside the git branch -a status? Otherwise, I can't commit file to remotes/origin/Dennis.
The git branch-a status is shown in my macbook terminal:
macbook$ git branch -a
* Dennis
master
remotes/origin/HEAD -> origin/master
remotes/origin/master
Upvotes: 1
Views: 2278
Reputation: 47
git fetch --prune
In addition to @VonC's answer I also like to add --prune flag to the fetch command so that it can remove the remote branches that have been deleted from the list.
Upvotes: 0