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.4 History

These commands show you your history, including where your code has been, who did what and when, changes, and statistics. Many of these commands are detailed in Chapter 6, Working with Git’s History.

Show All History

 
​prompt> git log

Display Log with Patch Showing Change

 
​prompt> git log -p

Limit Log to Show One Entry

 
​prompt> git log -1

Limit Log to Show Twenty Entries and Patches

 
​prompt> git log -20 -p

Show Commits from Past Six Hours

 
​prompt> git log --since="6 hours"

Show Commits Older Than Two Days

 
​prompt> git log --before="2 days"

Show Log for Single Commit Three Commits Prior to HEAD

 
​prompt> git log -1 HEAD~3

Or...

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