From: Enrico Weigelt <enrico.weigelt@vnc.biz>
To: thomas@koch.ro
Cc: git@vger.kernel.org
Subject: Re: Merge conflicts with version numbers in release branches
Date: Wed, 29 May 2013 11:09:08 +0200 (CEST) [thread overview]
Message-ID: <1346886189.4154.1369818548437.JavaMail.root@vnc.biz> (raw)
In-Reply-To: <201304071749.10912.thomas@koch.ro>
Thomas Koch wrote:
> it's a common problem[1,2,3] in Maven (Java) projects and probably in other
> environments too: You have the version number of your project written in the
> pom.xml. When one merges changes upwards from the maint branche to master,
> the
> version numbers in maint and master are different and cause a merge conflict.
My advice: dont merge directly, but rebase to latest master. Maybe even rebase
incrementally (eg. "git rebase master~100 && git rebase master~99 && ...).
This heavily reduces the chance of conflicts that need to be resolved manually.
I'm a big fan of topic branches. For example, we have some bug #1234 in
the maintenance release. Fork off at latest maint, lets call the branch
1234_somewhat. Now do your bugfixing, testing, etc. When thats done, rebase
on latest maint (in case maint moved further) and merge it into maint.
Now rebase the 1234_somewhat branch onto master, do tests etc and finally
merge into it. (note: all merges here will be fast-forward, IOW: pure
append operations).
Of course, all of this wont make the conflicts on the version number change
go away magically, but at least it will be more clear while resolving it.
If you always do the version number changes in some separate commit, which
has some specially formatted message (eg. 'Release: 1.2.4') you could
hack some some little filter-branch magic, which automatically kicks off
these commits before rebasing.
prev parent reply other threads:[~2013-05-29 9:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-07 15:49 Merge conflicts with version numbers in release branches Thomas Koch
2013-05-29 9:09 ` Enrico Weigelt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1346886189.4154.1369818548437.JavaMail.root@vnc.biz \
--to=enrico.weigelt@vnc.biz \
--cc=git@vger.kernel.org \
--cc=thomas@koch.ro \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).