|
From: | Gregory Heytings |
Subject: | Re: src/Makefile unhelpful |
Date: | Sun, 18 Sep 2022 21:50:26 +0000 |
To remove changes to tracked files, use git checkout.No, git checkout doesn't remove changes to tracked files.Yes, it does. git checkout HEAD <pathspec> overwrites the matching files with contents from the HEAD commit. In that operation mode it is similar to git reset --hard.
With <pathspec>s, indeed, but in this discussion we were mentioning commands that operate on all files at once.
(On a side note, it is preferable to use git restore <pathspec> instead of git checkout <pathspec>.)
[Prev in Thread] | Current Thread | [Next in Thread] |