开发者

Return to previous uncommitted state in git

开发者 https://www.devze.com 2023-03-27 05:41 出处:网络
I have a lot of files. They are change. I\'m do commit in git. Then I change files more and more. But now i\'m not do the commit.

I have a lot of files. They are change. I'm do commit in git. Then I change files more and more. But now i'm not do the commit. Then i'm do git re开发者_如何学编程set hard to previous(last) commit.

How can i return into the last uncommitted state of my folder? (For example 10 seconds before the git reset hard)


In the `git' manpage it states that

git reset --hard

Resets the index and working tree. Any changes to tracked files in the working tree since are discarded.

If you or your editor didn't make backups it seems as if your files are gone.

0

精彩评论

暂无评论...
验证码 换一张
取 消