-1

I am a bit new to git Now I am trying to pull the git from the gitlab into my own laptop

I have tried git fetch --all and git pull --all

but the red line branches won't appear in my local one

image here

As you can see in the image when i type git branch only 1 branch appear

iBug
  • 35,554
  • 7
  • 89
  • 134
Khant
  • 958
  • 5
  • 20
  • Does this answer your question? [How to fetch all Git branches](https://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches) – phd Apr 29 '20 at 07:50
  • https://stackoverflow.com/search?q=%5Bgit%5D+fetch+all+branches – phd Apr 29 '20 at 07:50

2 Answers2

0

It's as simple as git checkout master.

Those beginning with origin/ are remote branches, i.e., the local "cached" state of the remote repository. To create a local branch off it is as simple as checking out the "base name" of the branch.

iBug
  • 35,554
  • 7
  • 89
  • 134
0

To checkout any remote branch and switch on it in simple step :

git checkout -b local-branch-name origin/remote-branch-name

eg:

git checkout -b yourbranch origin/yourbranch

By this command you can checkout remote branch as well as switch to the branch

Mayank Raipure
  • 1,773
  • 15
  • 12