Is there any way I can do
git add -A
git commit -m \"commit message\"
in one command?
I seem to be doing those two commands a lot,
I use the following (both are work in progress, so I'll try to remember to update this):
# Add All and Commit
aac = !echo "Enter commit message:" && read MSG && echo "" && echo "Status before chagnes:" && echo "======================" && git status && echo "" && echo "Adding all..." && echo "=============" && git add . && echo "" && echo "Committing..." && echo "=============" && git commit -m \"$MSG\" && echo "" && echo "New status:" && echo "===========" && git status
# Add All and Commit with bumpted Version number
aacv = !echo "Status before chagnes:" && echo "======================" && git status && echo "" && echo "Adding all..." && echo "=============" && git add . && echo "" && echo "Committing..." && echo "=============" && git commit -m \"Bumped to version $(head -n 1 VERSION)\" && echo "" && echo "New status:" && echo "===========" && git status
With the echo "Enter commit message:" && read MSG
part inspired by Sojan V Jose
I'd love to get an if else
statement in there so I can get aacv to ask me if I want to deploy when it's done and do that for me if I type 'y', but I guess I should put that in my .zshrc
file