Reading git diff output

I am just starting to learn how to use git and have run git diff on the files below – Im a bit confused about how you read the output –

From what I understand so far the below is saying there is a difference between the working directory and the index in relation to file01 and then file02. Could someboby explain in english how you read this part of the output –> @@ -1,4 +1 @@

  • In the context of git (and diff), what is a “hunk”
  • Check diff against file on the server
  • Using mercurial and beyond compare 3(bc3) as the diff tool? help needed
  • How to apply git diff --binary patches without git installed?
  • Git diff between master and origin/master using Netbeans
  • Merging with “git mergetool”
  • Thanks for your help

    diff --git a/file01 b/file01
    index cc17fa4..d0a432b 100644
    --- a/file01
    +++ b/file01
    @@ -1,4 +1 @@
    -datafiles
    -file01
    -file02
    -file03
    +This is a change
    diff --git a/file02 b/file02
    index e69de29..552c22e 100644
    --- a/file02
    +++ b/file02
    @@ -0,0 +1 @@
    +and this is another change
    

  • Is there a git-merge --dry-run option?
  • Split large Git repository into many smaller ones
  • Cygwin gitk issue
  • IDEA: How to import module from git?
  • deploying a website/webapp via git/gitolite permissions error
  • Is it possible to host interactive R Markdown files on Github Pages?
  • One Solution collect form web for “Reading git diff output”

    The @@ -1,4 +1 @@ means:

    -1,4: here are 4 lines from the original starting from line 1.

    +1 and here is 1 line from the new version.

    Git Baby is a git and github fan, let's start git clone.