Search code examples
gitsmartgit

What does staged Modified mean in SmartGit


After pulling the status of some of the files is "Staged Modified".

What does this mean?
If I double click it I can choose to compare between 3 options.

  • Head vs Index
  • Head vs Working Tree
  • Index vs Working Tree

Can you also help me understand the above?
I have looked into it and my understanding is as such:

  • Head is where we currently are. So if we checkout a new branch that is the head.
  • Working Tree is basically the whole repository on your system.
  • Index is the staging

How do I reconcile those notions with the state reported by SmartGit?


Solution

  • As seen in "SmarGit Repositories, Directories and Files"

    File is modified in the working tree and in the Index in different ways.
    You may Commit either Index changes or working tree changes.

    This is typical of when you add part of a file to the index, but keep part of a file still modified in the working tree.

    Illustration from this article:

    https://blogs.endjin.com/wp-content/uploads/2015/03/SmartGitstagehunk_thumb.png

    Which gives:

    https://blogs.endjin.com/wp-content/uploads/2015/03/clip_image002_thumb.png