I'm trying to cultivate the habit of more frequent and smaller commits and find typing 3 separate commands super annoying, so I wrote a simple bash script and here's how
- Set
git pushto push to your current branch as default if you haven't done so already
git config --global push.default current
- In your terminal type
vim ~/.bashrc(vim ~/.bash_profilefor you Mac using folks), at the end of the file put in the following - you can name the short cut whatever you want
function gitpewpew() {
git add -A