Git Hub Clone All Branches At Once

后端 未结 7 1084
时光取名叫无心
时光取名叫无心 2020-12-07 12:19

I\'m trying to clone an entire repository onto my machine using linux. I used

git clone    

I then went into the folder where i

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 12:57

    I find this to be the simple solution to clone a git repository and all remote branches:

    # Clone remote repository and all branches
    git clone --mirror https://github.com/test/frontend.git frontend/.git
    
    # Change into frontend directory
    cd frontend
    
    # Update git config
    git config --unset core.bare
    
    # Checkout master branch
    git checkout master
    

提交回复
热议问题