Vladimir Nadvornik <nadvor...@suse.cz> writes:

> Dne čtvrtek 16 Srpen 2012 17:18:45 Klaus Ethgen napsal(a):
>>
>> --no-ff is sometimes a good idea, sometimes not. I think that should be
>> used where it is reasonable. For example I might cherry-pick several
>> commits fixing small thinks into a temp branch. As long as nobody did
>> did something in master a ff might be reasonable. In other cases where
>> there is a new feature --no-ff is the best way.
>> 
>
> In my work project we do a rebase each time before pushing to master,
> I am not used to other methods.

There are two reasonable approaches:

  for a single commit, or maybe a few, that you have on local master,
  rebase to origin/master to avoid gratuitous merge commits.  This is
  cvs-like/svn-like where there are just commits on one branch

  Do almost all development, except simple, self-contained changes, on
  branches.  Use explicit merge commits.

> Each commit contain logically connected things - for example adding a
> variable in one file and using it in another.

Agreed, that's the way to do it.

> But merge commits break
> this rule - they contains random changes together. So my feeling is
> that with merge commits the history would be harder to review and
> debug but I have no practical experiences...

No, merge commits don't break that rule; they do something different,
which is to apply the combination of several commits in one logical
step, still preserving the ability to examine the original commits.

In particular, merge commits let you do

  git log --first-parent origin/release_1_1..origin/release_1_2

to see all the commits made directly on master from 1.1 to 1.2.  For
merges, you'll see the merge commit, and for direct commits you'll see
that.  Each merge commit can be traced from the second parent (the last
commit on the branch) back to a commit that is reachable on master.

This is what I've been doing in a large project, with 1-2 orders of
magnitude more activity than geeqie.

If you rebase the branch, or keep all work on master, then you just have
a bunch of commits for a big feature all together, and the structure is
lost.

Of course, the most important thing is to keep the quality of individual
commits high, regardless.

Attachment: pgpx2QCXG58nx.pgp
Description: PGP signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geeqie-devel mailing list
Geeqie-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geeqie-devel

Reply via email to