September 2009
Beginner
942 pages
85h 34m
English
commit
git commit [-- file ...]Commit the changes that have already been staged in the index, updating HEAD.
If -a is given, all changed files in the work tree—not only staged changes—will be committed. (-a is the common behavior in systems like Subversion.)
If files are specified, exactly those files are committed, regardless of the state of the index.
You cannot commit a file for the first time, even with -a, unless it has first been added with git add.
| -a (all files, not just added ones) |
| --amend |
| -m commit-message, --message=commit-message |
| -F commit-message-file |
| -q, --quiet |
| -s, --signoff |
To commit changes only to files in the mylib directory:
$ git commit -- mylib
Created commit 90716b6: my new commit
1 files changed, 13 insertions(+), 0 deletions(-)
create mode 100644 test-file