Skip to content

Instantly share code, notes, and snippets.

@ridingintraffic
Created December 23, 2018 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ridingintraffic/f8535f22964541e7636e6a35638f2d00 to your computer and use it in GitHub Desktop.
Save ridingintraffic/f8535f22964541e7636e6a35638f2d00 to your computer and use it in GitHub Desktop.
git updater
function traffic-update()
{
currentDir=$(pwd)
cd ~/git/github/<someuser>/traffic/
git pull
git add --all
git co -a -m "autoupdate script"
git push origin `git rev-parse --abbrev-ref HEAD` # push to origin/master
cd $currentDir
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment