Skip to Main Content
Pragmatic Guide to Git
book

Pragmatic Guide to Git

by Travis Swicegood
November 2010
Beginner content levelBeginner
160 pages
2h 50m
English
Pragmatic Bookshelf
Content preview from Pragmatic Guide to Git
7 Committing Changes

Git tracks changes to your repository through commits, which you make with the git commit command. It is the workhorse of Git and something you’ll use a ton.

Prior to most commits, you need to stage the files you want to commit using the git add. You can use it to stage specific changes, portions of files, and other things that are covered in more detail in Task 6, Staging Changes to Commit.

Each commit requires a commit message. You can use -m and a string in quotation marks as your message or use Git’s editor to write a message. There’s more information on the editor in Task 2, Configuring Git. You can specify multiple paragraphs by specifying multiple -m parameters.

You can avoid git add and commit every ...

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

Pragmatic Version Control Using Git

Pragmatic Version Control Using Git

Travis Swicegood
Git Version Control Cookbook - Second Edition

Git Version Control Cookbook - Second Edition

Kenneth Geisshirt, Emanuele Zattin(EUR), Aske Olsson, Rasmus Voss
Git for Programmers

Git for Programmers

Jesse Liberty

Publisher Resources

ISBN: 9781680500028Errata