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

 


Thanks for reading. Make sure you follow me on Twitter to stay up to date on the progress of my side projects T.LYWeather Extension, and Link Shortener Extension. If you are interested in the tech I use daily, check out my uses page.  

Leave a Reply

Your email address will not be published. Required fields are marked *