How can I switch to another branch in git?

后端 未结 9 668
难免孤独
难免孤独 2021-01-29 17:38

Which one of these lines is correct?

git checkout \'another_branch\'

Or

git checkout origin \'another_branch\'
         


        
9条回答
  •  执念已碎
    2021-01-29 18:24

    Check : git branch -a

    If you are getting only one branch. Then do below steps.

    • Step 1 : git config --list
    • Step 2 : git config --unset remote.origin.fetch
    • Step 3 : git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*

提交回复
热议问题