Making some changes

edit the README.txt file again, adding a new row.


$ 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:   README.txt

no changes added to commit (use "git add" and/or "git commit -a")

What has changed?


$ git diff

diff --git a/README.txt b/README.txt
index e51ca0d..a697828 100644
--- a/README.txt
+++ b/README.txt
-Hello Git
+Hello Git
+Second line

$ git add README.txt
$ git status

On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

      modified:   README.txt


What did we change?


$ git diff
$ git diff --cached    (or --staged)

diff --git a/README.txt b/README.txt
index e51ca0d..62567d0 100644
--- a/README.txt
+++ b/README.txt
-Hello Git
 No newline at end of file
+Hello Git
+Second line

$ git commit -m "update README"

[master 1251a45] update README
 1 file changed, 2 insertions(+), 1 deletion(-)