Switch to another branch without changing the workspace files

前端 未结 8 1583
深忆病人
深忆病人 2021-01-30 06:26

I cloned a git repository from GitHub, made some changes and some commits; I made quite a lot and all are quite dirty, so they\'re not suitable for a pull request. Now I created

8条回答
  •  太阳男子
    2021-01-30 06:55

    git fetch && git checkout branch_name( "branch_name" here is the name of the branch )

    Then you will see message, Switched to a new branch 'branch_name' Branch 'branch_name' set up to track remote branch 'branch_name' from 'origin'.

提交回复
热议问题