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 have this function in my .bash_profile or .profile or .zprofile or whatever gets sourced in login shells:
function gac () {
# Usage: gac [files] [message]
# gac (git add commit) stages files specified by the first argument
# and commits the changes with a message specified by the second argument.
# Using quotes one can add multiple files at once: gac "file1 file2" "Message".
git add $1 && git commit -m "$2"
}