O'Reilly logo

Professional Git by Brent Laster

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7Working with Changes over Time and Using Tags

In this chapter, you'll learn about Git's history functionality, how to look at changes over time, and the many options that are available to users for displaying history information in different ways. You'll explore Git functionality that can tell you who changed each line of a file and when. Then you'll look at how to point Git back to previous versions with the Git equivalent of a rollback and how to cancel out changes. You'll also learn how to mark points in history with Git's tag functionality.

In the Advanced Topics section, you'll learn how to use signed tags for added security, and the Git reflogs functionality to track how references change over time.

THE LOG COMMAND

The key function of any source management system is tracking changes over time, as well as being able to easily identify and retrieve any previous changes. In Git, you do this with the log command, Git's version of a history command. The syntax is as follows:

git log [<options>] [<revision range>] [[--] <path>…]

This is a deceptively simple format description for an operation that comes with an extensive set of options, especially for putting constraints on which history items are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required