Next | Join my army of git zombies! | 20 |
Why do we have to git add pie over and over?
Isn't Git already tracking pie?
Answer: git add does not (only) tell Git to start tracking a file
In between the repository and your working directory is the index
When you check out a commit, the tree is copied to the index
Then from the index to your working directory
When you run a diff, Git diffs the working directory against the index
When you record a commit, Git makes a new tree from the index
The git add command is adding files to the index
Next | ![]() |
Copyright © 2011 M. J. Dominus |