0 votes
30 views
in Technology by (230k points)
What is the difference between ‘HEAD’, ‘working tree’ and ‘index’?

1 Answer

0 votes
by (230k points)

The working tree or workspace is the directory containing the source files that you are currently working on.

The index is the staging area in Git where the commits are prepared. It lies between the commit and your working tree. Git index is one large binary file that enlists all files in the current branch, their names, sha1 checksums, and timestamps.

This file is present at <baseOfRepo>/.git/index. HEAD is the reference or pointer to the latest commit in the current checkout branch.

Related questions

0 votes
1 answer 27 views
0 votes
1 answer 23 views
0 votes
1 answer 18 views
0 votes
1 answer 35 views
0 votes
1 answer 16 views
0 votes
1 answer 54 views
0 votes
1 answer 28 views
0 votes
1 answer 21 views
0 votes
1 answer 31 views
0 votes
1 answer 28 views
asked Nov 4, 2020 in Technology by JackTerrance (230k points)
0 votes
1 answer 38 views
0 votes
1 answer 25 views
0 votes
1 answer 24 views
0 votes
1 answer 25 views
0 votes
1 answer 17 views
0 votes
1 answer 37 views
...