[Kde-scm-interest] Git and the needs of KDE PIM

Thiago Macieira thiago at kde.org
Sat Jan 16 19:32:47 CET 2010


Em Sábado 16. Janeiro 2010, às 18.41.46, Thomas McGuire escreveu:
> So what we need from Git is:
> - A tool/command that lists all unmerged commits from one branch to the
> other 

That tool is git log. (Or its underlying counterpart, git rev-list)

git log branch1..branch2

Lists all commits that are in branch2 that aren't in branch1.

> - A tool/command that lets you block/remove commits from that list 

Impossible and non-existant.

> - And of course a way to actually merge the commits, but I heard that Git is
> much much better than SVN in that regard

git merge.

Merges in Git always merge all commits, never any less. That's a definition of 
merge.

So you don't block commits. You design your branches so that all commits are 
mergeable. The two situations where one commit may be necessary in one branch 
but not in the branch where it's normally merged are:

1) a fix that doesn't apply to the other branch
in that case, apply it, then merge to the other branch, then apply the reverse

2) if this is to happen frequently, then you need actually three branches
a common one, which is merged to two branches

> Someone mentioned that feature branches should do the job, but I don't
> think this will work. Much of the work we do in the branches are simple
> bugfixes, so we wouldn't create a branch for each single bugfix, like you
> would do for new features.

"feature branches" are for features, not for bugfixes. Just apply all bugfixes 
to the lowest/earliest branch where the fix makes sense.

> Also, that probably just moves the problem around: If I created a branch
> for each bugfix, I would then need a list of _branches_ that are not
> merged yet, together with a way to block those.

git branch can do that.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-scm-interest/attachments/20100116/79a3cd1f/attachment.sig 


More information about the Kde-scm-interest mailing list