Created
June 27, 2013 14:45
-
-
Save blackymetal/5877016 to your computer and use it in GitHub Desktop.
Git Discard file changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout v1.2.3 -- filename # tag v1.2.3 | |
git checkout stable -- filename # stable branch | |
git checkout origin/master -- filename # upstream master | |
git checkout HEAD -- filename # the version from the most recent commit | |
git checkout HEAD^ -- filename # the version before the most recent commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment