Last active
November 3, 2016 19:18
-
-
Save sytrus-in-github/a2f7489be31311b852c03b9c42f79f3d to your computer and use it in GitHub Desktop.
A handy function for Git console to synchronize your local/remote repo. Usage: paste the function in file ~/.profile or ~/.bashrc. (or c:\Users\[your_name]\.bash_profile for Windows users)
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
function gsync() { | |
echo "*** Synchronizing current repo ***" | |
echo | |
echo "=== adding all ..." | |
git add . | |
echo | |
echo "=== committing all ..." | |
git commit -a -m "$1" | |
echo | |
echo "=== pulling ..." | |
git pull | |
echo | |
echo "=== pushing ..." | |
git push | |
echo | |
echo "*** Done! ***" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment