What is a hash in Git?
Experience Level: Junior
Tags: GitSource control
Answer
In Git, each commit has 40 character identifier that is calculated using SHA-1 hashing algorithm. This commit identifier is called hash.
When you execute git log
command, you can see that each commit has hash.
Related Git job interview questions
How can you verify if a branch is merged into master in Git?
Git MediorHow can you find five the most recent commits in Git repository?
Git MediorHow do you discard all changes from your local Git workspace?
GitSource control JuniorWhat is the most basic Git workflow that you can use every day?
GitSource control JuniorWhat is a workspace in Git?
GitSource control Junior