What's the difference between Mercurial's "tip" tag and the "default" branch
16,206
Tip is the most recent changeset in the repository. Default is a branch. Tip is a special Tag (a named changeset) which always refers to the most recently changed Head.
Related videos on Youtube
Author by
Dexygen
Updated on September 17, 2022Comments
-
Dexygen almost 2 years
We are just switching to Mercurial where I work this week. I'm starting to read material, and was hoping somebody could succinctly answer this question:
What's the difference between Mercurial's "tip" tag and the "default" branch?
-
Jonathan Hartley over 13 yearsSo does this mean that tip will move around from one branch to another as people push changesets on different branches? If so, what's the point of it, since you can't rely on it being in any one place? Thanks!
-
Dave Horton over 13 yearsTrue, I can't think of any usecases for Tip aside from checking how old my repo is or sharing the id of my tip when talking with other developers. Also as giszmo points out, hg update -r tip is a quick way to get to the newest code regardless of branch.
-
dwardu over 9 years
tip
is just an alias for the last changeset in your repo. Sometimes it comes in handy, e.g. you make a change in branchsupercalifragilisticexpialidocious
which you would then like to merge into branchdefault
; so then you update to branchdefault
and because you know that the work you want to merge intodefault
is at the tip of your local repository (because you’ve just committed it), instead of doinghg merge supercalifragilisticexpialidocious
you may dohg merge tip
. -
Admin almost 6 yearsnote to future readers: "somewhat" is a a placeholder here for a tag or branch name. It is not a special branch, tag, term, or keyword in mercurial, like I originally thought.