Created
February 16, 2015 18:09
-
-
Save joshfriend/ff4c08ff633e7d62412e to your computer and use it in GitHub Desktop.
Git command to create pull requests in Stash
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
STASH_DEFAULT_USERS="@joshfriend @user2 @user3" | |
STASH_DEFAULT_BRANCH=develop |
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 | |
GIT_ROOT=$(git rev-parse --show-toplevel) | |
DEFAULT_STASHRC=$HOME/.stashrc | |
LOCAL_STASHRC=$GIT_ROOT/.stashrc | |
if [ -f "$LOCAL_STASHRC" ]; then | |
STASHRC=$LOCAL_STASHRC | |
else | |
STASHRC=$DEFAULT_STASHRC | |
fi | |
# Load stashrc file defaults | |
if [ -f "$STASHRC" ]; then | |
. "$STASHRC" | |
fi | |
if [ "$#" -ne 0 ]; then | |
stash pull-request $@ | |
else | |
echo "stash pull-request $STASH_DEFAULT_BRANCH $STASH_DEFAULT_USERS" | |
stash pull-request $STASH_DEFAULT_BRANCH $STASH_DEFAULT_USERS | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment