CHAPTER 4

image

Managing Files

In this chapter we will practice and analyze file system commands used within the working directory. We will create, modify, remove, and rename files, and check how these operations influence the repository.

As you already know, git doesn't automatically register the changes made in the working directory. To create a new revision you have to issue special commands:

$ git add -A$ git commit -m "Some comment..."

Up to this point we treated them as one atomic operation that can be described as saving the snapshot of the working directory as a new revision. Now, we will dissect this operation into two separate steps:

$ git ...

Get Git Recipes: A Problem-Solution Approach 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.