I cloned a git repository from github, created a new branch branch1, commited some changes in it, then pushed the new branch into a remote gitlab repository. Then created another branch from branch1 named branch2, and pushed to remote gitlab repo. Now, when I use git branch -r I only see branch1. But if I clone the remote gitlab repository in another folder I can see both branches.
I also observed when I pushed for the first time into the remote repository, only branch1 was pushed, but not master branch for example.
One more observation, I can see branch2 online in my gitlab account.
I am really confused why this happens. Any help is highly appreciated.