Last active
December 12, 2017 17:45
-
-
Save tonning/152927751a17acf2ce8dd82b091fbdf4 to your computer and use it in GitHub Desktop.
Git save and resume work in progress aliases
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] | |
save = "!f() { \ | |
echo \"\\033[32mSaving Work in Progress...\"; \ | |
git add . && git commit -m 'WIP'; \ | |
}; f" | |
resume = "!f() { \ | |
if [[ $(git log --format=%B -n 1 | grep WIP) == WIP ]]; then \ | |
echo \"\\033[32mResuming Work in Progress...\"; \ | |
git reset HEAD~; \ | |
else \ | |
echo \"\\033[31mNo Work in Progress to resume...\"; \ | |
fi \ | |
}; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment