* visualizing Git's Git repo
@ 2008-05-26 20:47 Joshua Haberman
2008-05-26 22:59 ` Eric Hanchrow
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Joshua Haberman @ 2008-05-26 20:47 UTC (permalink / raw)
To: git
I'm a casual Git user. One thing that's been troubling me about Git
is that when I look at Git's own Git repository, the revision history
is not at all easy to understand. I like to view my own Git
repositories with:
$ gitk --all --date-order
When I run this command, what I'm really asking is "give me a visual
summary of what's up with my project lately." But with Git's
repository, there are far too many branches and merges for this view
to make any kind of visual sense.
So my questions are:
1. what do you all do to get a high-level view of what's going on with
Git development? do you use gitk? if so, what options?
2. as a project, why don't you rebase when merging long-running
branches into master? For example, take commit 7e83003029 from May 25
which merged a branch that was based at 4b172de81 from May 14. Why
not rebase this to May 25 as part of the merge? When you don't do
this (ie. in the status quo) 'gitk --date-order' for the Git
repository has >10 parallel branches most of the time, which makes it
impossible to follow visually.
I'm sure you have reasons for doing things the way you do, I just want
to hear what they are. And sorry if this is a FAQ -- feel free to
point me at any documentation that explains this.
Josh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: visualizing Git's Git repo
2008-05-26 20:47 visualizing Git's Git repo Joshua Haberman
@ 2008-05-26 22:59 ` Eric Hanchrow
2008-05-26 23:42 ` Joshua Haberman
2008-05-26 23:46 ` Shawn O. Pearce
2008-05-27 0:41 ` Björn Steinbrink
` (2 subsequent siblings)
3 siblings, 2 replies; 9+ messages in thread
From: Eric Hanchrow @ 2008-05-26 22:59 UTC (permalink / raw)
To: git
You might not know -- I didn't until five minutes ago -- that you can
omit entire branches, like this:
$ gitk --all ^refs/remotes/origin/man ^refs/remotes/origin/html
--
The story will be familiar to anyone who has ever seen a movie about a
troubled athlete and a brilliant coach. It will also be familiar to
anyone who has not. -- Roger Ebert, on "Stick It" (2006)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: visualizing Git's Git repo
2008-05-26 22:59 ` Eric Hanchrow
@ 2008-05-26 23:42 ` Joshua Haberman
2008-05-26 23:46 ` Shawn O. Pearce
1 sibling, 0 replies; 9+ messages in thread
From: Joshua Haberman @ 2008-05-26 23:42 UTC (permalink / raw)
To: git
Eric Hanchrow <offby1 <at> blarg.net> writes:
>
> You might not know -- I didn't until five minutes ago -- that you can
> omit entire branches, like this:
>
> $ gitk --all ^refs/remotes/origin/man ^refs/remotes/origin/html
Thanks for the tip -- I had tried the converse, which is to only include master,
but both this and your strategy still leave at least 10 concurrent branches at
almost any point in time.
Josh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: visualizing Git's Git repo
2008-05-26 22:59 ` Eric Hanchrow
2008-05-26 23:42 ` Joshua Haberman
@ 2008-05-26 23:46 ` Shawn O. Pearce
1 sibling, 0 replies; 9+ messages in thread
From: Shawn O. Pearce @ 2008-05-26 23:46 UTC (permalink / raw)
To: Eric Hanchrow; +Cc: git
Eric Hanchrow <offby1@blarg.net> wrote:
> You might not know -- I didn't until five minutes ago -- that you can
> omit entire branches, like this:
>
> $ gitk --all ^refs/remotes/origin/man ^refs/remotes/origin/html
>
And if you do this a lot you can remember it as a shorthand:
$ git config alias.seeall '! gitk --all ^refs/remotes/origin/man ^refs/remotes/origin/html'
$ git seeall
--
Shawn.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: visualizing Git's Git repo
2008-05-26 20:47 visualizing Git's Git repo Joshua Haberman
2008-05-26 22:59 ` Eric Hanchrow
@ 2008-05-27 0:41 ` Björn Steinbrink
2008-05-27 20:36 ` Joshua Haberman
2008-05-28 3:15 ` Linus Torvalds
3 siblings, 0 replies; 9+ messages in thread
From: Björn Steinbrink @ 2008-05-27 0:41 UTC (permalink / raw)
To: Joshua Haberman; +Cc: git
On 2008.05.26 13:47:33 -0700, Joshua Haberman wrote:
> I'm a casual Git user. One thing that's been troubling me about Git is
> that when I look at Git's own Git repository, the revision history is not
> at all easy to understand. I like to view my own Git repositories with:
>
> $ gitk --all --date-order
>
> When I run this command, what I'm really asking is "give me a visual
> summary of what's up with my project lately." But with Git's
> repository, there are far too many branches and merges for this view to
> make any kind of visual sense.
>
> So my questions are:
>
> 1. what do you all do to get a high-level view of what's going on with
> Git development? do you use gitk? if so, what options?
Doesn't make much sense with --all, but if you only view one branch, eg.
origin/master or origin/next, --no-merges might produce an output that's
more suitable for you.
Björn
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: visualizing Git's Git repo
2008-05-26 20:47 visualizing Git's Git repo Joshua Haberman
2008-05-26 22:59 ` Eric Hanchrow
2008-05-27 0:41 ` Björn Steinbrink
@ 2008-05-27 20:36 ` Joshua Haberman
2008-05-27 23:49 ` Jeff King
2008-05-28 3:15 ` Linus Torvalds
3 siblings, 1 reply; 9+ messages in thread
From: Joshua Haberman @ 2008-05-27 20:36 UTC (permalink / raw)
To: git
Joshua Haberman <joshua <at> reverberate.org> writes:
> 1. what do you all do to get a high-level view of what's going on with
> Git development? do you use gitk? if so, what options?
I get the impression from this thread that core Git developers don't make
visualizing the repository a regular part of their development workflow. Is
that accurate? What do you all do to keep tabs on Git development?
> 2. as a project, why don't you rebase when merging long-running
> branches into master?
Is there really no rationale that anyone can offer for why you do things this
way? I look to Git's own Git repo for best practices, and given Git's emphasis
on "history hygiene" I'm certain that there are reasons for why you do things
the way you do.
Josh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: visualizing Git's Git repo
2008-05-27 20:36 ` Joshua Haberman
@ 2008-05-27 23:49 ` Jeff King
0 siblings, 0 replies; 9+ messages in thread
From: Jeff King @ 2008-05-27 23:49 UTC (permalink / raw)
To: Joshua Haberman; +Cc: git
On Tue, May 27, 2008 at 08:36:16PM +0000, Joshua Haberman wrote:
> > 1. what do you all do to get a high-level view of what's going on with
> > Git development? do you use gitk? if so, what options?
>
> I get the impression from this thread that core Git developers don't make
> visualizing the repository a regular part of their development workflow. Is
> that accurate? What do you all do to keep tabs on Git development?
I don't know if I count as a core Git developer, but I do use gitk daily
to track what goes into Junio's repo. My refs are organized something
like:
remotes/origin/* - tracking branches of Junio's git.git
heads/jk/* - long running topics branched from master
heads/next - Junio's next branch with short or temporary patches on top
My git day generally starts like this:
git fetch ;# grab newly merged stuff
gitk origin/next...next ;# see what's new
git rebase origin/next ;# and bring ourselves up to date
You don't necessarily get to see all of the topic branches labeled
individually, but generally you see each merged topic preceded by the
'Merge ...' commit.
For long running branches, I leave them alone until I'm ready to work on
them. And then it's:
git checkout jk/whatever
gitk origin/master.. ;# what was I doing again?
git rebase origin/master ;# should be clean if nobody else
# is touching the same area
And if the rebase isn't clean, then I investigate individual areas with:
gitk --no-merges jk/whatever...origin/master problematic_file.c
So maybe that is a bit of a boring workflow description, but I do
visualize with gitk all the time. I tend to do a lot of bug-hunting,
too, for which I don't end up doing visualization. Instead, I almost
always rely on asking more specific questions about content: blame
(especially "tig blame"), bisect, and pickaxe ("git log -S").
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: visualizing Git's Git repo
2008-05-26 20:47 visualizing Git's Git repo Joshua Haberman
` (2 preceding siblings ...)
2008-05-27 20:36 ` Joshua Haberman
@ 2008-05-28 3:15 ` Linus Torvalds
2008-05-28 8:39 ` Jakub Narebski
3 siblings, 1 reply; 9+ messages in thread
From: Linus Torvalds @ 2008-05-28 3:15 UTC (permalink / raw)
To: Joshua Haberman; +Cc: git
On Mon, 26 May 2008, Joshua Haberman wrote:
>
> I'm a casual Git user. One thing that's been troubling me about Git is that
> when I look at Git's own Git repository, the revision history is not at all
> easy to understand. I like to view my own Git repositories with:
>
> $ gitk --all --date-order
I would seriously suggest avoiding "--date-order" unless you have some
deep reason to see how the commits on different development paths relate
to each other date-wise - something you should normally not have.
The thing is, --date-order strings out and mixes up the commits on the
same development chain, and by doing so it makes the different chains of
development much harder to see. It also ends up showing the development in
a more "parallel" way, which in turn makes the view even harder to read.
So I would suggest not using --date-order by default. It doesn't add
anything to any normal flow, and it makes the big picture harder to see.
The only time you really want --date-order (or "-d", which is shorthand
for it for just gitk) is really
- when the big picture is really really simple, and you actually want to
see more detail because the big picture is too trivial to even be
interesting otherwise.
(In other words: --date-order is fine for really simple development
where there is only ever just a couple of branches or where you have
pruned away so much of the history that the remaining part is simple)
- when you want to debug "git rev-list" behaviour itself, since the date
order actually matters for how git traverses the commit chains.
The second case is something that I suspect nobody but me and a few other
people have ever done. I found it very useful together with --show-all
when I was debugging the revision walker (see commits
3131b713013f06285cad3ffdcc61f417ac4ba158
7d004199d134c9d465e013064f72dbc04507f6c0
where the first implements --show-all, and the second one is the end
result of my debugging).
In other words: never start out with "-d" or "--date-order" by default.
Only if you have some reason to then think that the view is too simple or
you need to drill down into the commit relationships should you use it.
> 1. what do you all do to get a high-level view of what's going on with Git
> development? do you use gitk? if so, what options?
I use "gitk" almost every time when I pull from anybody in the kernel. I
tend to do it with git itself, when I update from Junio. The most common
arguments I use is
gitk ORIG_HEAD..
or
gitk @{12.hours.ago}..
where the latter in particular is very nice to see an overview of "ok,
what did I pull today".
And I basically *never* use --date-order, nor do I often look at more than
one single branch.
The one special case is when merging, and there are conflicts. In that
case, I often look at two branches, and I often do
gitk MERGE_HEAD... <filenames>
to see the symmetric difference (actually, I usually just do "gitk
--merge" which is just shorthand for the above). And in that case, I do
occasionally add a "-d", because that shows what the relative timing were
for the commits, which is sometimes interesting information (ie if there
are clashes, which commit is the more recently committed one can actually
be somewhat relevant - although it's rare).
So in that case I look at two branches (the one I'm on, and the one I'm
merging), and the "..." format means that I ignore everything that is
common to them.
> 2. as a project, why don't you rebase when merging long-running branches into
> master?
For the kernel, there's been a lot of discussion about why I prefer people
to rebase vs merge (or often - *avoiding* merges entirely), see the kernel
mailing list, and search for merging. There was a thread (subject:
"[alsa-devel] HG -> GIT migration") about a week ago where I tried to
explain my opinions about about some of this.
Linus
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: visualizing Git's Git repo
2008-05-28 3:15 ` Linus Torvalds
@ 2008-05-28 8:39 ` Jakub Narebski
0 siblings, 0 replies; 9+ messages in thread
From: Jakub Narebski @ 2008-05-28 8:39 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Joshua Haberman, git
Linus Torvalds <torvalds@linux-foundation.org> writes:
> On Mon, 26 May 2008, Joshua Haberman wrote:
> >
> > 2. as a project, why don't you rebase when merging long-running branches into
> > master?
>
> For the kernel, there's been a lot of discussion about why I prefer people
> to rebase vs merge (or often - *avoiding* merges entirely), see the kernel
> mailing list, and search for merging. There was a thread (subject:
> "[alsa-devel] HG -> GIT migration") about a week ago where I tried to
> explain my opinions about about some of this.
You can read summary of this (I think) discussion at KernelTrap:
http://kerneltrap.org/Linux/Git_Management
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-05-28 8:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-26 20:47 visualizing Git's Git repo Joshua Haberman
2008-05-26 22:59 ` Eric Hanchrow
2008-05-26 23:42 ` Joshua Haberman
2008-05-26 23:46 ` Shawn O. Pearce
2008-05-27 0:41 ` Björn Steinbrink
2008-05-27 20:36 ` Joshua Haberman
2008-05-27 23:49 ` Jeff King
2008-05-28 3:15 ` Linus Torvalds
2008-05-28 8:39 ` Jakub Narebski
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).