setting git-diff --color-words as git-diff
Hi there, I like the output of
Code:
git diff --color-words old..new R. Edit: I guess I should've said that I do not want an alias for diff --color-words |
It sounds like you need to use what is known generically as an 'alias'. If you are using bash (or other Korn shell derivative):
Code:
alias git="git diff --color-words" --- rod. |
Luckily my "Edit" was an hour before your post ;)
R. |
Okay, so now I'm confused about what you do want. Can you spell out the command you presently use, followed separately by the command that you think would be preferable?
--- rod. |
Well, I presently use an alias of the form
Code:
git wdiff old..new Code:
[alias] Code:
git diff --color-words old..new Code:
git diff old..new I'm sorry for not spelling everything in the original post. Cheers, R. Edit. Just in case someone reads this thread at some point later. If you want to have an alias for a git command, it is much better to put it in your ~/.gitconfig file under the [alias] clause as I posted here instead of a strange alias in bashrc. On the one hand cause it doesn't need to be in memory all time. On the other cause that way you can still use git as the first command. Note that the suggestion in post #2 would've been quite strange when you try "git pull" for example :) |
just found this:
Code:
$ git config --global color.diff auto Code:
$ git config --global color.diff always |
All times are GMT -5. The time now is 12:05 PM. |