Last active
September 7, 2020 13:10
-
-
Save sroccaserra/3cfa309f16d1ee20081af3804421f739 to your computer and use it in GitHub Desktop.
Test and commit or revert (TCR)
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 | |
| T() { | |
| npm t | |
| } | |
| C() { | |
| git commit -am green | |
| echo 'Commit :)' | |
| } | |
| R() { | |
| git reset --hard | |
| echo 'Revert!' | |
| } | |
| if T ; then C ; else R ; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment