Created
December 1, 2021 04:41
-
-
Save keyle/4241c1192cd934ba99306ae5a297435d to your computer and use it in GitHub Desktop.
update but first check for status change
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
| update() { | |
| git status --porcelain | |
| if read -q "choice?stash changes? Y/y: "; then | |
| echo "" | |
| git stash | |
| echo "-----------------------------------" | |
| git pull --all | |
| echo "-----------------------------------" | |
| git stash pop | |
| else | |
| echo "" | |
| git pull --all | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment