Differences
This shows you the differences between two versions of the page.
git [2021/04/05 11:23] 127.0.0.1 external edit |
git [2023/08/10 09:41] (current) mihael |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== git ====== | ====== git ====== | ||
+ | |||
+ | ===== Reset file to HEAD ===== | ||
+ | To reset both the working copy of my-file.txt and its state in the Git index to that of HEAD: | ||
+ | |||
+ | < | ||
+ | git checkout HEAD -- my-file.txt | ||
+ | </ | ||
===== Remove last commit ===== | ===== Remove last commit ===== |