Created
February 10, 2021 20:29
-
-
Save renzocastro/dd3aaee88d3c6ecc477fcab4a7b261d8 to your computer and use it in GitHub Desktop.
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
| #!/bin/bash | |
| # Reference: https://stackoverflow.com/a/59874960 | |
| if [ $# -eq 0 ]; then | |
| git stash push -- $(git diff --staged --name-only) | |
| else | |
| git stash push -m "$@" -- $(git diff --staged --name-only) | |
| fi | |
| set -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment