git read-tree

CommandNew filesChanged filesDeleted files
Alice/> git init
Initialized empty Git repository in /home/rene/github/github/git-internals/repos/read-tree/Alice/.git/
snap no: 1
Alice/> echo one > one.txt
snap no: 2
Alice/> mkdir dir; echo two > dir/two.txt
snap no: 3
Alice/> mkdir dir/subdir; echo three > dir/subdir/three.txt
snap no: 4
dir/subdir/three.txt
Alice/> git add *
snap no: 5
Alice/> git commit . -m "added a few files"
[master (root-commit) b475e40] added a few files
 3 files changed, 3 insertions(+)
 create mode 100644 dir/subdir/three.txt
 create mode 100644 dir/two.txt
 create mode 100644 one.txt
snap no: 6
.git/COMMIT_EDITMSG
.git/logs/HEAD
.git/logs/refs/heads/master
.git/objects/00/79e4333a35e292b34c4759410a1b46d32a8f0a [tree]
.git/objects/b4/75e40660511aae9d8b63392c718217a9f6cc6c [commit]
.git/objects/f2/e2823f5849ba8681df07b0a00116cf10e594f6 [tree]
.git/objects/f5/72124f30244172618c7ba17d52a685174c4e0f [tree]
.git/refs/heads/master
Alice/> git rm -r dir
rm 'dir/subdir/three.txt'
rm 'dir/two.txt'
snap no: 7
.git/index
dir/two.txt
dir/subdir/three.txt
Alice/> git commit . -m "deleted a few files"
[master 267ef04] deleted a few files
 2 files changed, 2 deletions(-)
 delete mode 100644 dir/subdir/three.txt
 delete mode 100644 dir/two.txt
snap no: 8
.git/COMMIT_EDITMSG
.git/logs/HEAD
.git/logs/refs/heads/master
.git/refs/heads/master
Alice/> git status
On branch master
nothing to commit, working directory clean
snap no: 9
Alice/> git read-tree b475e40
snap no: 10
.git/index
Alice/> git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

	new file:   dir/subdir/three.txt
	new file:   dir/two.txt

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	deleted:    dir/subdir/three.txt
	deleted:    dir/two.txt

snap no: 11