[Digikam-devel] please avoid "merge" commits!!

Francesco R. francesco at pnpitalia.it
Fri Feb 17 22:59:33 GMT 2012


In data venerdì 17 febbraio 2012 21:56:03, Matthias Welwarsky ha scritto:
> Hello,
> 
> 99f28d0 Merge branches 'master' and 'master' of
> git://anongit.kde.org/digikam
> 
> and
> 
> 2ea3bd8 Merge branch 'master' of git://anongit.kde.org/digikam
> 
> Please avoid that. The history becomes unreadable and if you merge a
> feature branch with a lot of commits it becomes very difficult to find
> regressions with git bisect, because it cannot descent into the branch
> that was merged.
> 
> Therefore:
> - always use "git pull --rebase" when you update from origin,
> - if you accitendally forgot, use "git rebase origin/<branchname>" before
> "git push origin <branchname>" to clean up.
> 
> regards,
> matthias

ack, I've done a change at the same time of someone else and git refused to 
push, so I've done a `git pull -a` `git commit` `git push` cicle, the first 
pull should hve be done with --rebase right? The man page of git pull is a bit 
worrying tough [1]

while we are at it, I'm currently using the following cicle to merge the 
changes to the branch (sql/2.0) I use as a testbed, do you have better 
suggestion for this as well?

git pull -a
git merge origin/master
git push git at git.kde.org:digikam sql/2.0
git pull -a
git status


[1]
       --rebase
           Rebase the current branch on top of the upstream branch after 
fetching. If there is a remote-tracking branch corresponding to the
           upstream branch and the upstream branch was rebased since last 
fetched, the rebase uses that information to avoid rebasing
           non-local changes.

           See branch.<name>.rebase and branch.autosetuprebase in git-
config(1) if you want to make git pull always use --rebase instead of
           merging.

               Note
               This is a potentially dangerous mode of operation. It rewrites 
history, which does not bode well when you published that
               history already. Do not use this option unless you have read 
git-rebase(1) carefully.



More information about the Digikam-devel mailing list