Skip to Main Content
Pragmatic Version Control Using Git
book

Pragmatic Version Control Using Git

by Travis Swicegood
December 2008
Intermediate to advanced content levelIntermediate to advanced
184 pages
4h 47m
English
Pragmatic Bookshelf
Content preview from Pragmatic Version Control Using Git

A1.2 Normal Usage

You use these commands doing normal, day-to-day activities. These are your bread-and-butter commands, the ones we covered in Chapter 4, Adding and Committing: Git Basics.

Add a New File or Stage an Existing File and Commit

 
​prompt> git add <some file>
 
​prompt> git commit -m "<some message>"

Stage a Partial File

Note: [ ... ] indicates optional parameters.

 
​prompt> git add -p [<some file> [<some file> [and so on]]]
 
​... select hunks to commit ...​

Add Files via Git’s Interactive Add Mode

 
​prompt> git add -i

Stage Changes to Modified, Tracked Files

 
​prompt> git add -u [<some path> [<some path>]]

Commit Changes to All Modified, Tracked Files

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

Git: Mastering Version Control

Git: Mastering Version Control

Ferdinando Santacroce, Aske Olsson, Rasmus Voss, Jakub Narębski
Pragmatic Guide to Git

Pragmatic Guide to Git

Travis Swicegood
Git Version Control Cookbook - Second Edition

Git Version Control Cookbook - Second Edition

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

Publisher Resources

ISBN: 9781680500189Errata Page