Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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:
 +
 +<code>
 +git checkout HEAD -- my-file.txt
 +</code>
  
 ===== Remove last commit ===== ===== Remove last commit =====