Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The Git index is where files are staged for commits; take a look at this <a href="https://stackoverflow.com/questions/4084921/what-does-the-git-index-exactly-contains/4086986#4086986" title="what does the git index EXACTLY contains?">StackOverflow answer</a> for more information. When you stage files for commit, the index reflects the latest staged information. Staging a file a second time will change the Git index to reflect the file's content in the working directory.</p> <p>However, with some additional work, you can see the content of the file as it was for each stage. You can use <a href="http://schacon.github.com/git/git-ls-files.html" rel="nofollow noreferrer" title="Git ls-files"><code>git ls-files</code></a> after each stage to get a list of file <a href="http://book.git-scm.com/1_the_git_object_model.html" rel="nofollow noreferrer" title="Git Object Model">blobs</a> that you can then use later for comparison using <code>diff</code> or some other difference tool.</p> <p>Here's a little sample session as an example.</p> <pre><code>$ git init Initialized empty Git repository in /home/user/tmp/.git/ $ echo "foo" &gt; foo $ git add foo $ git ls-files --stage 100644 257cc5642cb1a054f08cc83f2d943e56fd3ebe99 0 foo $ echo "bar" &gt; foo $ git add foo $ git ls-files --stage 100644 5716ca5987cbf97d6bb54920bea6adde242d87e6 0 foo $ git cat-file blob 257cc56 &gt; foo.257cc56 $ git cat-file blob 5716ca5 &gt; foo.5716ca5 $ diff foo.257cc56 foo.5716ca5 1c1 &lt; foo --- &gt; bar </code></pre> <p>But this is a lot of work and requires careful planning and storing of blob hash values to accomplish.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload