git diff

CommandNew filesChanged filesDeleted files
Alice/> git init
Initialized empty Git repository in /home/rene/github/github/git-internals/repos/diff/Alice/.git/
snap no: 1
Alice/> printf "foo\nabr\nbaz\n" > foo.txt
snap no: 2
Alice/> printf "one\ntwo\nthree\n" > 123.txt
snap no: 3
Alice/> git add .
snap no: 4
Alice/> git commit . -m "first revision"
[master (root-commit) 55b5f57] first revision
 2 files changed, 6 insertions(+)
 create mode 100644 123.txt
 create mode 100644 foo.txt
snap no: 5
Alice/> sed -i s/abr/bar/ foo.txt
snap no: 6
Alice/> echo hello > world.txt
snap no: 7
Alice/> git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   foo.txt

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	world.txt

no changes added to commit (use "git add" and/or "git commit -a")
snap no: 8
Alice/> git diff --cached
snap no: 9
Alice/> git diff
diff --git a/foo.txt b/foo.txt
index 94d2fa3..86e041d 100644
--- a/foo.txt
+++ b/foo.txt
@@ -1,3 +1,3 @@
 foo
-abr
+bar
 baz
snap no: 10
Alice/> git add world.txt
snap no: 11
Alice/> git diff --cached
diff --git a/world.txt b/world.txt
new file mode 100644
index 0000000..ce01362
--- /dev/null
+++ b/world.txt
@@ -0,0 +1 @@
+hello
snap no: 12
Alice/> git diff
diff --git a/foo.txt b/foo.txt
index 94d2fa3..86e041d 100644
--- a/foo.txt
+++ b/foo.txt
@@ -1,3 +1,3 @@
 foo
-abr
+bar
 baz
snap no: 13