3 ms·
TIL (again) that the newer and supposedly nicer way to “take all the files in PATH back to how they were at COMMIT, without changing any other files or commit h
by divbzero 3y ago
TIL (again) that the newer and supposedly nicer way to “take all the files in PATH back to how they were at COMMIT, without changing any other files or commit history” is
git restore --source=COMMIT PATH
I have learned and tried this before but still have the muscle memory of doing
git checkout COMMIT PATH
- mpawelski 3y agoThere is a slight difference in behavior though. For restore you won't get you index (staging area) changed. Pass "--no-overlay" to checkout to get the same behavior as restore.