Any Change Creates New Heads?
Marijn Vriens
marijn at metronomo.cl
Tue Apr 28 16:23:30 CDT 2009
On Tue, Apr 28, 2009 at 11:09 PM, Isaac Jurado <diptongo at gmail.com> wrote:
> > It appears that any change I make in my local repository will create a
> > new head in the remote repository if anyone has made any changes to
> > the remote repository. Is this expected behaviour?
>
Any commit to a changeset that is not a head (ie, has no decending
changesets), will create an additional head.
Yes, just like any other distributed version control software.
>
> > Is there a way to prevent all these merges?
>
> You could pull and rebase your changes before pushing to the remote
> repository.
>
> http://www.selenic.com/mercurial/wiki/index.cgi/RebaseExtension
Hmmm... before we get into turning on all those fancy extensions, lets talk
about the normal way.
The normal way is that if you develop something and the "push" command
complains that it will create new heads (because someone else already
commited) you just "pull" those changes to your local repo (local head count
will go up). now locally merge your changes with the changes you just pulled
(head count will go down). If you now push, it will send your changes
without adding more heads to the remote server.
Merging is the normalest thing in the world in a DVCS. It's nothing to be
afraid of and trivial in 95% of the cases. If you have merge conflicts
often, maybe you should revise how work is distributed or see why certain
files need to be changed often by unrelated work.
Regards,
Marijn Vriens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20090428/9ce2bb75/attachment.htm
More information about the Mercurial
mailing list