Skip to content

Instantly share code, notes, and snippets.

@gchristofferson
Created December 21, 2018 00:57
Show Gist options
  • Save gchristofferson/ebff6323cbcf7289727830323ce4e28c to your computer and use it in GitHub Desktop.
Save gchristofferson/ebff6323cbcf7289727830323ce4e28c to your computer and use it in GitHub Desktop.
This script will push one time any changes to remote repository
#!/bin/sh
# this script takes one command line argument which is the name of the directory to push changes from to git
push() {
dir="$1"
cd $dir
echo "pushing any changes to git once"
git status
git add .
git commit -m "committing changes made on live server"
git push origin master
}
push $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment