Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

branches not showing up in new remote 'gitlab'

Tags:

git

gitlab

I added new remote based on some online information that I have collected. My commands are

git remote add gitlab  http://[email protected]/janedoe/my.git
git push gitlab master -f

But when I do

git branch -a

*master
sprint_2
sprint_3
remote/gitlab/master
remote/origin/HEAD -> origin/master
remote/origin/sprint_2
remote/origin/sprint_3
remote/origin/sprint_1

How come I don't see branches sprint_2/3/1 in my gitlab remote?

like image 789
Romeo Avatar asked Dec 11 '25 07:12

Romeo


1 Answers

this undesired behavior probably occur because the current branch has no upstream branch. To push the current branch and set the remote as upstream, use:

git push --set-upstream origin <your-branch-name>
like image 180
Farlon Souto Avatar answered Dec 14 '25 03:12

Farlon Souto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!