Skip to Content
Linux in a Nutshell, 6th Edition
book

Linux in a Nutshell, 6th Edition

by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
September 2009
Beginner
942 pages
85h 34m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, 6th Edition

Name

commit

Synopsis

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.

Options

-a (all files, not just added ones)
--amend
-m commit-message, --message=commit-message
-F commit-message-file
-q, --quiet
-s, --signoff

Examples

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
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Unix in a Nutshell, 4th Edition

Unix in a Nutshell, 4th Edition

Arnold Robbins
Linux Under the Hood

Linux Under the Hood

Sander van Vugt
Linux Kernel in a Nutshell

Linux Kernel in a Nutshell

Greg Kroah-Hartman

Publisher Resources

ISBN: 9780596806088Errata Page