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"
}
git commit -h
...
Commit contents options
-a, -all commit all changed files
...
git commit -a # It will add all files and also will open your default text editor.
对于人群中的银背,他们习惯了Subversion……我通常在我的项目的根目录中添加如下内容(在windows中作为一个bat文件,例如git-commit.bat)。然后当我想添加、提交和推送时,我只需键入git-commit "Added some new stuff"之类的东西,它就会全部进入远程回购。