Why won't “git reset HEAD” undo my uncommitted, unstaged changes?

后端 未结 6 1493
失恋的感觉
失恋的感觉 2021-02-05 09:30

I\'ve previously been able to undo changes through SourceTree by performing the \"Discard\" function, which under the hood produces this command:

git -c diff.mne         


        
6条回答
  •  臣服心动
    2021-02-05 09:57

    If you need to remove local changes then run following command

    git checkout -- file_name
    

    git reset HEAD does not remove local changes.

提交回复
热议问题