git checkout is not removing files that it should

后端 未结 4 2045
迷失自我
迷失自我 2021-02-14 07:27

Using a public repo, I want to get my master branch back to a certain commit from the past. I have reviewed the options and the best thing for me looks to be a simple checkout t

4条回答
  •  别跟我提以往
    2021-02-14 07:52

    git stash may be the quickest way to clean up the working tree. and then git checkout -b $newbranch $commit-sha1-you-want to create a branch you are going to work with. after all your work's done, git stash pop to restore the working tree.

提交回复
热议问题