3 ms·
that was my point, perhaps I could have made it clearer. git checkout <commit-hash> <filename> working copy of filename now gone if not committed.
by throwawayaway 12y ago
that was my point, perhaps I could have made it clearer.
git checkout <commit-hash> <filename>
working copy of filename now gone if not committed.
- Igglyboo 12y agoYou specified checking out a branch which is completely different than checking out a file by commit-hash.
- throwawayaway 12y agoof course you are correct. i am sorry. i was doing it from memory. you can leave out the commit-hash too, to get the same effect. not at a computer now but i think i remember "git checkout <commit-hash> * " being extra fun. update, this is what i meant: "git checkout * " "git checkout <commit-hash> * " "git checkout <branch> * " each have the same warningless wipeout of uncommitted changes.