Tell me the difference between head, working tree and index, in git.
Answer / Sunil Kumar Jayasawal
Git consists of three main areas: Head, Working Tree, and Index. Here's how they differ:n1. Head: Refers to the tip of a branch, which marks the most recent commit on that branch. It indicates the state that the project is currently at.n2. Working Tree: This is the copy of the entire repository on your local machine. It contains all the files and directories of the project, which can be modified and committed.n3. Index (or Staging Area): The index serves as an intermediate between the working directory and the Git repository. When changes are made to the files in the working tree, they can be staged using 'git add'. Once staged, these changes are stored in the index, ready to be committed.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is GIT stash?
What is a distributed vcs?
What does a commit object contain?
What does commit object contain?
Distinguish between git fetch and git pull?
What is ‘head’ in git?
How can you use git bisect to determine the source of a (regression) bug?
What is subgit and why is it used?
How to create tag?
Name a few Git repository hosting services
What is git bisect?
What is a repository and how will you create it?