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, ...
Get Learn Git in a Month of Lunches now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.