标签:
git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]
	         [--dry-run] [(-c | -C | --fixup | --squash) <commit>]
	         [-F <file> | -m <msg>] [--reset-author] [--allow-empty]
	         [--allow-empty-message] [--no-verify] [-e] [--author=<author>]
	         [--date=<date>] [--cleanup=<mode>] [--[no-]status]
	         [-i | -o] [-S[<keyid>]] [--] [<file>…?]
-a, --all
直接将工作区的修改提交至仓库。
a) 将暂存区的提交至仓库
[huey@huey-K42JE hello_git]$ date > datetime.txt [huey@huey-K42JE hello_git]$ git add . [huey@huey-K42JE hello_git]$ git commit -m "change datetime" [master 7983be4] change datetime 1 files changed, 1 insertions(+), 1 deletions(-)
b) 直接将工作区的修改提交至仓库
[huey@huey-K42JE hello_git]$ rm testfile.txt [huey@huey-K42JE hello_git]$ date > datetime.txt [huey@huey-K42JE hello_git]$ git commit -a -m "rm testfile & change datetime" [master 5622ecb] rm testfile & change datetime 2 files changed, 1 insertions(+), 2 deletions(-) delete mode 100644 testfile.txt
http://git-scm.com/docs/git-commit
Git CMD - add: Record changes to the repository
标签:
原文地址:http://www.cnblogs.com/huey/p/5089619.html