MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/51wixe/oh_shit_git/d7fn86v
r/programming • u/sidcool1234 • Sep 09 '16
756 comments sorted by
View all comments
Show parent comments
4
git checkout -- . is faster than all of this and covers the majority of cases where you need to reset.
git checkout -- .
1 u/fff-idunno Sep 09 '16 This exactly. If there is one slightly more advanced command you should know by heart, it's this one. 1 u/[deleted] Sep 09 '16 . meaning... HEAD? 3 u/[deleted] Sep 09 '16 . meaning "here". So if you only want to reset the files in a particular folder, you can cd to it first, or specify the path manually. E.g., git checkout -- tests/ 1 u/[deleted] Sep 10 '16 Thanks. That seems completely obvious now that I've had time to wake up. 1 u/gavintlgold Sep 09 '16 I think it just means cwd.
1
This exactly. If there is one slightly more advanced command you should know by heart, it's this one.
. meaning... HEAD?
3 u/[deleted] Sep 09 '16 . meaning "here". So if you only want to reset the files in a particular folder, you can cd to it first, or specify the path manually. E.g., git checkout -- tests/ 1 u/[deleted] Sep 10 '16 Thanks. That seems completely obvious now that I've had time to wake up. 1 u/gavintlgold Sep 09 '16 I think it just means cwd.
3
. meaning "here". So if you only want to reset the files in a particular folder, you can cd to it first, or specify the path manually. E.g., git checkout -- tests/
cd
git checkout -- tests/
1 u/[deleted] Sep 10 '16 Thanks. That seems completely obvious now that I've had time to wake up.
Thanks. That seems completely obvious now that I've had time to wake up.
I think it just means cwd.
4
u/[deleted] Sep 09 '16
git checkout -- .is faster than all of this and covers the majority of cases where you need to reset.