Lazy Git Shortcut

1 min read
Lazy Git Shortcut

If you use git and are tired of typing git add . then git commit -a -m “your git message” then git push, add an alias function to your bash_profile to do it all in one quick command. The example below works on macOS but I would imagine it would work in Powershell in Windows. Save a few keystrokes with the shortcut!

function gcp() {
  git add .
  git commit -a -m "$*"
  git push
}

Then in your command line type: gcp fixed a bug