O'Reilly logo

Learn Git in a Month of Lunches by Rick Umali

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 7. Committing parts of changes

The Git staging area, introduced in the previous chapter, is a powerful but, at the same time, confusing feature of Git. This chapter builds on what you’ve learned about the staging area, helping you to understand it better.

The staging area is used to add, delete, and rename files before they are committed into the repository. Any change to the repository goes through the staging area, which means you must come to grips with it. The commands that manipulate the staging area include git add, git rm, git mv, and git reset.

The staging area also provides the ability to commit parts of files to the repository. If you add debugging code or print statements, and don’t want to commit these into the repository, ...

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