Last active
August 29, 2015 14:11
-
-
Save stantonk/dfc0a8828a9b01e08b72 to your computer and use it in GitHub Desktop.
Mercurial hg: Quickly squash a recent, unpushed commit with some un-committed changes. This is really handy when you forgot to do something, or a linter or CI suite catches errors before you push / merge.
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
#!/usr/bin/env bash | |
# N.B. requires patch queues (mq) enabled in your .hgrc. to finish this up | |
# and turn into a real commit, do `hg qfinish -a` | |
now=`date +"%s"` | |
patch_name='$now-temporary' | |
hg qnew $patch_name | |
hg qpop | |
hg qimport -rtip | |
hg qfold $patch_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment