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
6 Staging Changes to Commit

Git uses a two-step process to get changes into the repository. The first step is staging changes through git add. Staging a change adds it to the index, or staging area. This sits between the working tree—your view of the repository—and the actual repository.

Through the staging area, you can control what is staged from the most coarse-grained—adding everything within the repository—down to editing the changes, line by line.

First you can select individual files or paths to add by calling git add and passing the filename or path as the parameter. Git adds everything under a path if you provide that. It uses standard shell-style wildcards, so wildcards work: base.* matches base.rb and base.py.

Another quick ...

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