Last active
August 29, 2015 13:57
-
-
Save batmat/9758569 to your computer and use it in GitHub Desktop.
git backup (put this in your .git/config or better in your global gitconfig file).
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
[alias] | |
backup = "!f(){ git add -A . && git ci -q -m \"WIP backup\" && commit=`git show HEAD|head -1` && git reset HEAD~ && echo \"Backup OK: $commit (or use git reflog)\"; };f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment