Ask Your Question
3

What is the distinction between HEAD and master (or main)?

asked 2023-06-18 14:15:10 +0000

bukephalos gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-06-18 14:31:02 +0000

devzero gravatar image

In Git, "HEAD" is a pointer to the current commit in a branch. It is the commit that you're currently working on. On the other hand, "master" or "main" is a default branch that is created when a Git repository is initialized. It is usually the main branch that contains the latest stable version of your project.

To put it simply, HEAD is a pointer to the latest commit you are working on, whether that is in the master branch or another branch, while master/main is a branch that holds the latest stable release of the project.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-18 14:15:10 +0000

Seen: 15 times

Last updated: Jun 18 '23