How does staging a file modify the index file internally?

40 Views Asked by At

git index(.git/index) stores the state of tracked files (last committed state) and it can be shown via git ls-files --stage and git diff looks at the difference between index and working directory. How does the use of git add to stage files modify index file internally?

0

There are 0 best solutions below