In in 95% of my time I type “git add . -A” directly followed by “git commit -m “message” in the Git version control system.
That is a lot of typing for a very common case. Fortunately git allows to add an alias for the command. To add an alias for git add and git commit to your git configuration, open your .git/config file and add the following.
[alias] ac = !git add -A && git commit
Alternative you can use the –global flag from the command line:
git config --global alias.ac '!git add -A && git commit'
You now can add and commit to your Git repository via the command:
git ac -m "message"
Unfortunately alias seems not to be supported on the window implementation of git (msysgit). See the bug report: msysgit does not support alias definition.