Git add, commit and push in a single command

I'm lazy and i dont like typing 3 different git commands just to perform a commit, so a quick Google search led me to this great little nugget

https://stackoverflow.com/questions/19595067/git-add-commit-and-push-commands-in-one

Add this function to the bottom of your ~/.bashrc file then hit 'source ~/.bashrc' and you are good to go!

1    git add .
2    git commit -a -m "$1"
3    git push
4}```