Skip to content

Instantly share code, notes, and snippets.

@ibourgeois
Created May 6, 2015 19:36
Show Gist options
  • Save ibourgeois/b5bacb6d4714ace4b13a to your computer and use it in GitHub Desktop.
Save ibourgeois/b5bacb6d4714ace4b13a to your computer and use it in GitHub Desktop.
Bash Alias For Git Commit

Open your .bashrc file and add the following:

gitup() {
        git add .
        git commit -m "$1"
        git push -u origin master
}

alias gitup=gitup

Now you can cd into the local repo and run:

gitup 'commit message'

and it will trigger the gitup() function and apply the commit message that you've supplied to your commit!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment