Last active
September 5, 2017 13:56
-
-
Save vipickering/f2e275cd7ceeb047eb66b9e52d5b0034 to your computer and use it in GitHub Desktop.
Git Panic
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 panic="branchName='$(date +%Y-%m-%d-%H-%M)' && git checkout -b panic-'${branchName}' && git add -A && git commit -m 'panic' && git push --set-upstream origin panic-'${branchName}'" |
Updated to a var to ensure times match. Removed seconds to double ensure we don't get odd clashes.
As per Feedback here: https://twitter.com/vonorm_/status/905055729639464960
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This creates a git branch with a time and date stamp, prefixed with "panic" for easy identification. You can return to later and ensure the code isn't lost.