Created
November 15, 2011 21:21
-
-
Save drsnyder/1368387 to your computer and use it in GitHub Desktop.
Git push and pull scripts for ensuring the right source/destination
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
## gpull | |
#!/bin/bash | |
branch=$(git name-rev --name-only HEAD) | |
if [ "$1x" == "x" ]; then | |
echo "git pull origin $branch" | |
git pull origin $branch | |
else | |
echo "git pull $1 origin $branch" | |
git pull $1 origin $branch | |
fi | |
## gpush | |
#!/bin/bash | |
branch=$(git name-rev --name-only HEAD) | |
echo "git push origin $branch" | |
git push origin $branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment