Create branch by git cli,can't view in gitlab web

when I have created a new branch by git cli,this new branch can not been view in gitlab.
Must create new branch by gitlab web tools,then that branch can been view.
I don’t sure this is a bug with gitlab.

Are you pushing the new branch to Gitlab after you create it with git? I’ll give an example;

I created a project “Test”
I clone that project on my computer (in my case git clone git@myvm:sim085/Test.git)
I create a file and commit this file (git add *, git commit, git push origin master)

Next I create a new branch, so from my machine i run the command

git checkout -b mynewbranch

GitLab does not have knowledge of this branch as I have only created this from my machine. I will edit the file I created and I will then commit the change to GitLab.

git add *
git commit
git push origin mynewbranch

If I go to GitLab now I can see I have two branches (can confirm this from Network). Note that from Network you will see one line with two labels; “master” and “mynewbranch”. Even though this looks like one path in truth these are two branches; one master and the other one mynewbranch.

You can see this more clearly when you merge the branches.

git checkout master
git merge --no-ff mynewbranch
git push origin master

You should now see two paths in Network and the paths link back to “master”.