Switch to another branch without changing the workspace files

前端 未结 8 1430
深忆病人
深忆病人 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:49

    The best bet is to stash the changes and switch branch. For switching branches, you need a clean state. So stash them, checkout a new branch and apply the changes on the new branch and commit it

提交回复
热议问题