error: pathspec 'test-branch' did not match any file(s) known to git

后端 未结 11 1811
刺人心
刺人心 2020-12-13 17:31

I am a new user of Git. I have forked a repository called Spoon-Knife (available for practicing forking with Git). Then, I cloned it locally by running

git c         


        
11条回答
  •  甜味超标
    2020-12-13 18:00

    My friend, you need to create those corresponding branches locally first, in order to check-out to those other two branches, using this line of code

    git branch test-branch  
    

    and

    git branch change-the-title

    then only you will be able to do git checkout to those branches

    Also after creating each branch, take latest changes of those particular branches by using git pull origin branch_name as shown in below code

    git branch test-branch
    git checkout test-branch
    git pull origin test-branch
    

    and for other branch named change-the-title run following code =>

    git branch change-the-title
    git checkout change-the-title
    git pull origin change-the-title
    

    Happy programming :)

提交回复
热议问题