Last active
December 13, 2015 20:18
-
-
Save miketierney/4968487 to your computer and use it in GitHub Desktop.
Useful little script to sync your current tracking branch with it's remote counter-part. Save to ~/bin as "git-sync" and then `chmod +x` to get it to work.
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 | |
# | |
# $ git sync | |
# Pulling from remote... | |
# Current branch master is up to date. | |
# | |
# Pushing to remote... | |
# Everything up-to-date | |
# | |
git_sync() { | |
echo "Pulling from remote..." | |
git pull | |
echo -e "\nPushing to remote..." | |
git push | |
} | |
git_sync |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment