Using git, how do you reset the working tree to the state of the index?

后端 未结 4 926
伪装坚强ぢ
伪装坚强ぢ 2020-12-23 19:02

Situation:

  1. Edit files
  2. Add files to the index
  3. Edit more files

Now we have three different states. The state of HEAD, the state

4条回答
  •  萌比男神i
    2020-12-23 19:29

    You can use git stash save --keep-index to do this. After saving the stash, you can use git stash drop if you don't want to keep it around.

提交回复
热议问题