Monday, November 25, 2013

Simple linux bash script to commit and push git updates

This assumes you have setup the git on dev directory (replace as needed), it was fairly simple thanks to bitbucket instructions

Here is the code:
#!/bin/bash
cd /var/www/vhosts/dev
echo "Please enter commit comment: "
read input_variable
git commit -am "$input_variable"
git push -u origin master

Let me know if you have question, comments, etc

No comments: