Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show heads of one branch?

Tags:

Is it possible to ask Mercurial to show only the heads of one branch? For example, I often want to double-check that default only has one head, but currently I need to do that "manually" (ie, checking the output of hg heads for more than one entry which is in default).

like image 937
David Wolever Avatar asked Jun 24 '10 19:06

David Wolever


People also ask

What does git checkout head do?

Remember that the HEAD is Git's way of referring to the current snapshot. Internally, the git checkout command simply updates the HEAD to point to either the specified branch or commit. When it points to a branch, Git doesn't complain, but when you check out a commit, it switches into a “detached HEAD” state.

How to see Git heads?

You can view your repository's heads in the path . git/refs/heads/ . In this path you will find one file for each branch, and the content in each file will be the commit ID of the tip (most recent commit) of that branch.

How many heads can you create in a Git repository?

Answer. There can be any number of heads in a repository. By default there is one head known as HEAD in each repository in GIT.

What is HEAD repository in Git?

The HEAD in Git is the pointer to the current branch reference, which is in turn a pointer to the last commit you made or the last commit that was checked out into your working directory. That also means it will be the parent of the next commit you do.


1 Answers

hg heads <branch name> works on Mercurial 1.5.3.

like image 128
Omnifarious Avatar answered Oct 12 '22 15:10

Omnifarious