in Technology by
What is the difference between ‘HEAD’, ‘working tree’ and ‘index’?

1 Answer

0 votes
by

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
    Which command shows the difference between the working directory and the index or staging area? A. git status B. git diff...
asked Dec 17, 2022 in Technology by JackTerrance
0 votes
    In a B+-tree index ______ for each value, we would normally maintain a list of all records with ... Answers, Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    How to remove local (untracked) files from the current Git working tree?...
asked Jan 7, 2021 in Technology by JackTerrance
0 votes
    How do you delete untracked local files from your current working tree? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    What is the difference between Clustered and Non-clustered index?...
asked Dec 9, 2020 in Technology by JackTerrance
0 votes
    What is the difference between INDEX and RANK in Tableau?...
asked Oct 30, 2020 in Technology by JackTerrance
0 votes
    What is the command to reset your index as well as the working directory to the state of your last commit? A. git clean B. git reset C. git revert D. git checkout...
asked Dec 21, 2022 in Technology by JackTerrance
0 votes
    What may be the relationship between lake and birds on tree? Select the correct answer from above ... ,Science proposed by,electromagnetic theory engineering physics,Science nptel...
asked Nov 8, 2021 in Education by JackTerrance
0 votes
    Head to head Comparison between CSS and SCSS?...
asked Mar 3, 2021 in Technology by JackTerrance
0 votes
    What is head crash? Why is the cushion of air required between platter surface and read/write heads? Select the correct answer from above options...
asked Dec 17, 2021 in Education by JackTerrance
0 votes
    Compression techniques can be used on the keys to reduce both space and time requirements in a B-tree. 1) True 2) False...
asked Dec 23, 2020 in Technology by JackTerrance
0 votes
    What is the best case height of a B-tree of order n and which has k keys? a) logn (k+1) – 1 b) nk c) logk (n+1) – 1 d) klogn...
asked Dec 23, 2020 in Technology by JackTerrance
0 votes
    B-tree and AVL tree have the same worst case time complexity for insertion and deletion. a) True b) False...
asked Dec 23, 2020 in Technology by JackTerrance
0 votes
    A B-tree of order 4 and of height 3 will have a maximum of _______ keys. 1) 255 2) 63 3) 127 4) 188...
asked Dec 23, 2020 in Technology by JackTerrance
...