Tell me the difference between HEAD, working tree and index, in Git?

Technology CommunityCategory: GitTell me the difference between HEAD, working tree and index, in Git?
VietMX Staff asked 3 years ago
  • The working tree/working directory/workspace is the directory tree of (source) files that you see and edit.
  • The index/staging area is a single, large, binary file in /.git/index, which lists all files in the current branch, their sha1 checksums, time stamps and the file name – it is not another directory with a copy of files in it.
  • HEAD is a reference to the last commit in the currently checked-out branch.