Information Technology Reference
In-Depth Information
Figure 4-10 . The structure of a repository
The working directory is the place where you work. As you already know, you can
use arbitrary tools and commands to manipulate the files in the working directory.
Once you decide that the current state of the whole working directory or just some
files in it should be committed, you stage the files. You do this using $ git add, $ git
rm, and $ git mv commands. They all can accept wildcard characters, thus you can
write commands such as:
$ git add *
$ git rm *.txt
$ git mv .????* tmp/
You can avoid using the $ git rm and $ git mv commands because $ git
add can stage renames and file removal for you. The $ git add command accepts
optional parameters --all or -update , which can be abbreviated as -A and -u , re-
spectively. These parameters influence the default behavior of the $ git add com-
mand in a following ways:
• The $ git add * command will stage all new and modified files
present in the working directory (deleted files are not staged).
 
Search WWH ::




Custom Search