Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Git References (master and HEAD)

Sumit Rawal answered on May 6, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers


Git References (master and HEAD)

0

For most of the commands (like git log, git diff etc) we have to provide commit id as

argument. But remembering commit id is very difficult, even 7 characters also.

Git provides some sample names for these commit ids. We can use these names directly.

These are just pointers to commit ids. These sample names are called references or refs.

References are stored in .git/refs directory as text files.

There are multiple types of references like heads,tags and remotes.

Eg:

$pwd

/d/gitprojects/project6/.git/refs/heads

$ cat master

49aa8d79a9bab4c0d72dec217c0c6d5d96d604ce

Most of the times, we have to use the most recent commit id.

For such type of most commonly used commit ids git provides default references 

Popularity 1/10 Helpfulness 1/10 Language shell
Source: Grepper
Tags: git shell
Link to this answer
Share Copy Link
Contributed on May 06 2023
Sumit Rawal
0 Answers  Avg Quality 2/10


X

Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.