Re: diff display
- From: Johannes Wiedersich <johannes@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 10 Sep 2008 11:04:16 +0200
On 2008-09-10 09:52, James A. Donald wrote:
Under windows, diff usually works like windiff - you see
the two versions side by side, with the differences
highlighted by color
git-gui, however gives me a diff where I see a single
stream annotated with + and -
I find the single stream display really obscure, ugly,
and confusing.
Linux's diff by default works this way, because most people here
consider it more easy to spot differences on longer lines, if they are
placed on top of each other. Tools like kdiff3 have a side by side view.
To obtain this result on the command line use diff's -y option.
I guess it just takes a bit of getting used to.
but with color highlighting instead of + and -
On the comand line you get color highlighting by means of git's --color
option. (See 'man git-diff'). These settings can be made permanent by
putting them in your .gitconf. As an example here is part of mine:
/-----
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = green reverse
local = blue
remote = yellow
[color "diff"]
meta = green bold
frag = magenta bold
old = red bold
new = blue bold
[color "status"]
added = blue bold
changed = yellow bold
untracked = cyan bold
\-----
I don't know, if this will activate colors for the gui, though. (Just
tried it myself: at least I get colors on lenny.)
Can I get file changes recorded in git to display the
way they do in windows?
</rhetorical question>
If you insist that things in linux should be just like in windows, why
bother using linux?
<rhetorical question>
Sorry I can't help you with your side-by-side issue. I'm sure it
wouldn't be to difficult to write a little script that temporarily
clones a certain state of your git project to a different file location
and invokes kdiff3 on the tree and it's copy.
HTH,
Johannes
Attachment:
signature.asc
Description: OpenPGP digital signature
- Follow-Ups:
- Re: diff display
- From: Ron Johnson
- Re: diff display
- References:
- diff display
- From: James A. Donald
- diff display
- Prev by Date: Re: suspend/hibernate in gnome-lenny
- Next by Date: Re: diff display
- Previous by thread: Re: diff display
- Next by thread: Re: diff display
- Index(es):
Relevant Pages
|