Book Image

Git Version Control Cookbook

Book Image

Git Version Control Cookbook

Overview of this book

Table of Contents (19 chapters)
Git Version Control Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Interactive add with Git GUI


The interactive features of git add are really powerful in order to create clean commits that only contain a single logical change even though it was coded as a mix of feature adding and bug fixing. The downside of the interactive git add feature is that it is hard to get an overview of all the changes that exist in the file when only being showed one hunk at a time. To get a better overview of the changes and still be able to only add selected hunks (and even single lines), we can use git gui. Git GUI is normally distributed with the Git installation (MsysGit on Windows) and can be launched from the command line: git gui. If your distribution doesn't have Git GUI available, you can probably install it from the package manager named git-gui.

Getting ready

We'll use the same repository as in the last example and reset it to the same state so we can perform the same adds with Git GUI:

$ git clone https://github.com/dvaske/cookbook-tips-tricks.git
$ cd cookbook-tips...