Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Tell me the difference between head, working tree and index, in git.



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

Post New Answer

More Git Interview Questions

Mention the various git repository hosting functions.

1 Answers  


What is the function of ‘git stash apply’?

1 Answers  


In git how do you revert a commit that has already been pushed and made public?

1 Answers  


How to rebase master in git?

1 Answers  


Describe the branching strategies you have used.

1 Answers  


What is git bisect? How can you use it to determine the source of a (regression) bug?

1 Answers  


How to resolve a conflict in git?

1 Answers  


What is ‘head’ in git?

1 Answers  


What is the difference between the ‘git diff ’and ‘git status’?

1 Answers  


Name a few git commands and explain their usage.

1 Answers  


What is GIT version control?

1 Answers  


What are the advantages of using GIT?

1 Answers  


Categories