Using Git Aliases can make you feel like you have superpowers!
It wasn’t until recently that I discovered Git Aliases, they are so handy that I seriously don’t know how I lived without them. These are two that I use every day now.
git config — global alias.add-commit-push '!git add -A && git commit -m "$1" && git push && git status'
Once the alias has been added you can now add, commit and push all on one line.
git add-commit-push "Add, commit, push in one line!"
git config --global alias.new-branch '!git checkout -b "$1" && git add -A && git commit -m "$2" && git push -u origin "$1" && git status'
This alias adds, commits and pushes current changes to a new branch.
git new-branch "123-my-branch" "Checkout, add, commit, push!"
Checkout the Git documentation for other alias ideas. Enjoy!