Fork me on GitHub

Auto Push

Description: Push to git remote with commit in 1 step.

#!/bin/bash
#Description
echo "Locating your Shell config file.. Please wait"

shrc=`find . -name "~/.zshrc" -print`
if [ -z "$shrc" ]; then
    echo "Zsh Shell wasn't found. Trying to locate Bash Shell!"
else
    echo "function gitup() { \n
    git add . \n
    git commit -a -m "$1" \n
    git push \n
}\n " >> .zshrc
fi

shrc=`find . -name "~/.bashrc" -print`
if [ -z "$shrc" ]; then
    echo "Bash shell wasn't found. Contact your owner!"
else
    echo "function gitup() { \n
    git add . \n
    git commit -a -m "$1" \n
    git push \n
}\n " >> .bashrc
fi


Download the Script here.