Subject: Re: [Boost-build] Git usages
From: Dmitry Moskalchuk (dm_at_[hidden])
Date: 2015-04-13 11:27:54
On 13/04/15 17:38, Rene Rivera wrote:
> First, I'm likely the one responsible for this thread :-) In my
> defense.. No one has mentioned what "correct" git usage is. And no,
> I'm not interested in reading a whole book about it. But the the fact
> that it doesn't seem that there is a sigle, simple, command to do the
> equivalent of "svn update" is disgraceful from a UI design perspective.
Doing "svn update" you fetch commits from server and place your local
changes on top of it. In case of git, doing "git pull" do the same if
you don't have local commits; but if you have, git can "merge" your
local history with remote, or "rebase" your local history on top of
remote one. This is obviously not the case for svn, because there is no
> Read that.. Doesn't clear anything up. Here's some basic questions..
> What should I do if I'm using the Eclipse git integration? Should I
> look into using Mercurial to deal with the git repos as a more sane
Default git strategy (merge) is the safest one, even though it
periodically generate merge commits with not so useful comments like
"Merge branch A into B". From my git experience, I'd say that I
personally prefer merging than rebase - just because it's safe. Shortly
speaking, "git pull --rebase" rewrite history - and this is dangerous,
because if you don't _clearly_ understand what you do, you can corrupt
it. This is not git-specific, this goes from its "distributed" nature;
that's why you don't have such problems with svn.
TL;DR: if you want use 'rebase' strategy to keep history plain - you
must dive into git details. No other way. Otherwise you'll make it
wrong, sooner or later. Or, keep using "git pull" with default "merge"
strategy - this would be safe, but you'll be forced to live with
additional merge commits.
-- Dmitry Moskalchuk
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk