Information Technology Reference
In-Depth Information
CHAPTER 4
Managing Files
In this chapter we will practice and analyze file system commands used within the work-
ing 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 sav-
ing the snapshot of the working directory as a new revision. Now, we will dissect this
operation into two separate steps:
$ git add -A
and
$ git commit -m "Some comment..."
Git allows you to select which files should go to the next revision—this is the reason
why you need two commands to create a revision. The first command selects the files
for the next revision. The second command creates the revision using the selected files.
The files selected for the next revision are called staged files . The list of staged files is
stored in the .git/index file called the staging area or index .
Search WWH ::




Custom Search