-
-
Save sjl/248206 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Discard local changes | |
git checkout -f (git co -f) | |
# This will change the current parent revision if you're not at a branch tip. | |
# The fact that it discards local changes is just a side effect. | |
hg update --clean (hg co -C) | |
# What you really want is the command *designed* to throw away changes: revert. | |
hg revert --all [--no-backup] (hg rev -a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment