Next | MJD's Git tips and utilities | 22 |
When Git writes a commit, it doesn't snapshot the working tree
It snapshots the index
git-add copies files into the index
git-diff compares the working tree to the index
(git-diff --cached compares the index and the commit)
Copying the other way is an unwholesome mix of git-commit and git-reset
Next | Copyright © 2021 M. J. Dominus |