git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Linck <mgl@absolute-performance.com>
To: Michael Witten <mfwitten@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Questions about branches in git
Date: Thu, 28 Jan 2010 14:17:26 -0700	[thread overview]
Message-ID: <69b754db1001281317o69f8c3f9y412a8524407bacbf@mail.gmail.com> (raw)
In-Reply-To: <b4087cc51001281203q1f467480sdf848c9d3ced323b@mail.gmail.com>

On Thu, Jan 28, 2010 at 1:03 PM, Michael Witten <mfwitten@gmail.com> wrote:
> On Thu, Jan 28, 2010 at 12:44 PM, Mike Linck
> <mgl@absolute-performance.com> wrote:
>> ...
>> It seems that after a topic or bug branch is merged back into its
>> parent, especially if it was fast forwarded, it becomes hard to
>> determine what changes were made in it, to resolve the problem that it
>> was created to address.
>> ...
>> I understand that there are mechanism kind of available to address
>> this problem.  If we (all developers in my company) remember always to
>> rebase -i before they merge their topic branches back in, then it
>> could be squashed making it easier to identify and cherry pick onto
>> other branches...
>
> For now, you should probably rely on graphical tools like gitk in
> order to visualize the various branches. There's also `git log

Well, even gitk can't show me the information I'm looking for if the
parent branch ended up fast-forwarding to include the changes made in
the topic branch.  As far as I can tell there is *no way* to tell what
changes were made in a particular branch after a fast-forward has
taken place, which seems to make it hard to organize fixes for
specific topics/bugs/tickets.

> --graph'. You could also just keep your branches around for reference
> and use `git merge-base' as necessary.
>

Yeah, what concerns me is that there seems to be no point in keeping
your branches around "for reference" because even when you're looking
at them you can't tell what changes were made in them after they were
spawned, unless they haven't been merged into another branch yet.  So
it seems that a branch is only useful for merging once and unless the
branch was squashed in the process of mergin, good luck identifying
your change set for a particular topic.

I don't know if an uebercommit is necessary.  But it would help seem
like it would help if a branch knew about it's spawn point from its
parent, and if you could use that to get git log to only show you the
commits made to a branch after it was spawned.  And if there were
forms of operations like merge, or rebase that could act intelligently
based on that information like "merge this branch into that branch,
and by this branch I don't mean anything from this branch's parent
branch"  so that a fix that was developed on edge or master could be
safely merged into an old branch without importing every other change
on edge or master, and also the other way around.


I just looked at merge-base.  It doesn't seem to address the problem.
I grabbed an old topic branch from our repo which I knew was created
from master and at some point merged back into master via
fast-forward.  I checked it out, I called "git merge base topic-id
master", hoping that it would "output a commit which is reachable from
both A and B through the parent relationship."  Instead it seems to
have modified the topic branch by fast forwarding it to the include
all the changes up to the tip of master.  Clearly not what I'm looking
for.


Michael Linck

  reply	other threads:[~2010-01-28 21:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28 18:44 Questions about branches in git Mike Linck
2010-01-28 20:03 ` Michael Witten
2010-01-28 21:17   ` Mike Linck [this message]
2010-01-28 21:29     ` Jens Lehmann
2010-01-28 21:38       ` Mike Linck
2010-01-28 23:07         ` Heiko Voigt
2010-01-29  0:03         ` Nanako Shiraishi
2010-01-29  3:03           ` Junio C Hamano
2010-01-28 22:04     ` Nicolas Pitre
2010-01-28 22:13       ` Eugene Sajine
2010-01-28 22:14       ` David Aguilar
2010-01-28 22:18     ` Michael Witten
2010-01-28 22:56       ` Mike Linck
2010-01-28 23:01         ` Michael Witten
2010-01-29 10:07   ` Peter Krefting
2010-01-28 20:20 ` Michael Witten
2010-01-28 20:35 ` Michael Witten
2010-01-28 23:00 ` Martin Langhoff
2010-01-28 23:33 ` Junio C Hamano
2010-01-29  1:16   ` Mike Linck
2010-01-29 10:06 ` Peter Krefting

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=69b754db1001281317o69f8c3f9y412a8524407bacbf@mail.gmail.com \
    --to=mgl@absolute-performance.com \
    --cc=git@vger.kernel.org \
    --cc=mfwitten@gmail.com \
    /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).