Monday, November 25, 2013

Push up an existing repository []

You already have a Git repository on your computer. Let's push it up to Bitbucket.
cd /path/to/my/repo
git remote add origin
git push -u origin --all # pushes up the repo and its refs for the first time
git push -u origin --tags # pushes up any tags

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:
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