Created
January 29, 2014 07:59
-
-
Save tobyS/8683629 to your computer and use it in GitHub Desktop.
Git commands to stash, pop stash & rebase by default. Just put the files (with the given names) into a bin-dir and make them executable. The use e.g. "$ git spush" instead of "$ git push".
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
#!/bin/bash | |
STASH_RESULT="`git stash`"; | |
git pull --rebase | |
if `echo "$STASH_RESULT" | grep -q 'Saved working directory'` | |
then | |
git stash pop | |
fi |
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
#!/bin/bash | |
STASH_RESULT="`git stash`"; | |
git pull --rebase && git push | |
if `echo "$STASH_RESULT" | grep -q 'Saved working directory'` | |
then | |
git stash pop | |
fi |
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
#!/bin/bash | |
STASH_RESULT="`git stash`"; | |
git rebase -i | |
if `echo "$STASH_RESULT" | grep -q 'Saved working directory'` | |
then | |
git stash pop | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks nifty, too. However, I'm quite used to the
git <command>
schema and the looses
disturbs that a bit.