threads / discuss / 21194

git log --graph

Subject: git log --graph

## tl;dr

7 messages between Oct 11, 2009 and Oct 12, 2009.

replies: 6people: 5as markdown or json

Dilip M· Oct 11, 2009, 18:27 UTC · lore
I am using: git version 1.6.3.2

Somehow not getting text graph as mentioned in http://www.gitready.com/intermediate/2009/01/26/text-based-graph.html

Any hints would really help..

I am trying git log --graph. (has commits in two branches...). But always see one line :(

-- 
Dilip
Sverre Rabbelier· Oct 11, 2009, 18:35 UTC · re: Dilip M · lore

Re: git log --graph

Heya,
On Sun, Oct 11, 2009 at 20:27, Dilip M <dilipm79@gmail.com> wrote:
> I am trying git log --graph. (has commits in two branches...). But
> always see one line :(

It'll show you the history of one branch at a time online, you won't get the demo-ed multiple lines unless the branch you're looking at contains merges.

-- 
Cheers,

Sverre Rabbelier
Matthieu Moy· Oct 11, 2009, 19:40 UTC · re: Sverre Rabbelier · lore

Re: git log --graph

Sverre Rabbelier <srabbelier@gmail.com> writes:
Show 9 quoted lines
> Heya,
>
> On Sun, Oct 11, 2009 at 20:27, Dilip M <dilipm79@gmail.com> wrote:
>> I am trying git log --graph. (has commits in two branches...). But
>> always see one line :(
>
> It'll show you the history of one branch at a time online, you won't
> get the demo-ed multiple lines unless the branch you're looking at
> contains merges.
That said, git log --graph --all will show multiple branches.

I personnally like the format of git log --graph --pretty=oneline --abbrev-commit with ui.color set to true in ~/.gitconfig.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Jakub Narebski· Oct 11, 2009, 20:30 UTC · re: Matthieu Moy · lore

Re: git log --graph

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 5 quoted lines
> I personnally like the format of
> 
>  $ git log --graph --pretty=oneline --abbrev-commit
>
> with ui.color set to true in ~/.gitconfig.
You can use
  $ git log --graph --oneline
nowadays for that.  A bit shorter.
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Dilip M· Oct 12, 2009, 03:01 UTC · re: Sverre Rabbelier · lore

Re: git log --graph

On Mon, Oct 12, 2009 at 12:05 AM, Sverre Rabbelier <srabbelier@gmail.com> wrote:
Show 9 quoted lines
> Heya,
>
> On Sun, Oct 11, 2009 at 20:27, Dilip M <dilipm79@gmail.com> wrote:
>> I am trying git log --graph. (has commits in two branches...). But
>> always see one line :(
>
> It'll show you the history of one branch at a time online, you won't
> get the demo-ed multiple lines unless the branch you're looking at
> contains merges.
Understood. it shows only when I have merged conflicts!
In case, it is a fast forward merge. It doesn't show. Which is good :)
Thanks to all.

- Dilip

Matthieu Moy· Oct 12, 2009, 06:54 UTC · re: Dilip M · lore

Re: git log --graph

Dilip M <dilipm79@gmail.com> writes:
> Understood. it shows only when I have merged conflicts!
>
> In case, it is a fast forward merge. It doesn't show. Which is good :)

Fast-forward and merge conflicts are two different things. Non-fast forward occurs when you merge two branches which are not a direct ancestor of each other, i.e. both have commits that the other do not have.

In case of non-fast forward, if you didn't touch the same file in both branches, the merge is still trivial and conflict-free. If you touched the same files, then Git has to apply in-file merge strategy, but that doesn't mean you'll get conflicts either. Conflicts will occur when you touched the same part of the same file.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
B Smith-Mannschott· Oct 12, 2009, 05:08 UTC · re: Dilip M · lore

Re: git log --graph

On Sun, Oct 11, 2009 at 20:27, Dilip M <dilipm79@gmail.com> wrote:
Show 9 quoted lines
> I am using: git version 1.6.3.2
>
> Somehow not getting text graph as mentioned in
> http://www.gitready.com/intermediate/2009/01/26/text-based-graph.html
>
> Any hints would really help..
>
> I am trying git log --graph. (has commits in two branches...). But
> always see one line :(

"one line"? 1 of history? (i.e. the history of the current branch, but not the other) 2 of text? 3 --pretty=oneline?

assuming your problem is 1:
git log --all --graph
//ben

← back to recent threads