Skip to content

Commit df24353

Browse files
committed
Cleaned readme
The image may need to change to a smaller version.
1 parent 3f30577 commit df24353

File tree

1 file changed

+50
-32
lines changed

1 file changed

+50
-32
lines changed

readme.md

Lines changed: 50 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,52 @@
1-
###############
2-
# diff-so-fancy builds on the good-lookin' output of diff-highlight to upgrade your diffs' appearances
3-
# * Output will not be in standard patch format, but will be readable
4-
# * No pesky `+` or `-` at line-stars, making for easier copy-paste.
5-
#
6-
# Screenshot: https://github.com/paulirish/dotfiles/commit/6743b907ff58#commitcomment-13349456
7-
#
8-
#
9-
# Usage
10-
#
11-
# git diff | diff-highlight | diff-so-fancy
12-
#
13-
# Add to .gitconfig so all `git diff` uses it.
14-
# git config --global core.pager "diff-highlight | diff-so-fancy | less -r"
15-
#
16-
#
17-
# Requirements / Install
18-
#
19-
# * GNU sed. On Mac, install it with Homebrew:
20-
# brew install gnu-sed --with-default-names # You'll have to change below to `gsed` otherwise
21-
# * diff-highlight. It's shipped with Git, but probably not in your $PATH
22-
# ln -sf "$(brew --prefix)/share/git-core/contrib/diff-highlight/diff-highlight" ~/bin/diff-highlight
23-
# * Add some coloring to your .gitconfig:
24-
# git config --global color.diff-highlight.oldNormal "red bold"
25-
# git config --global color.diff-highlight.oldHighlight "red bold 52"
26-
# git config --global color.diff-highlight.newNormal "green bold"
27-
# git config --global color.diff-highlight.newHighlight "green bold 22"
28-
#
29-
###############
30-
31-
# npm
32-
# npm install -g diff-so-fancy
1+
# diff-so-fancy
2+
3+
diff-so-fancy builds on the good-lookin' output of diff-highlight to upgrade your diffs' appearances
4+
* Output will not be in standard patch format, but will be readable
5+
* No pesky `+` or `-` at line-stars, making for easier copy-paste.
6+
7+
## Screenshot
8+
9+
*diff-highlight (default) vs diff-so-fancy*
10+
11+
![diff-highlight vs diff-so-fancy](https://cloud.githubusercontent.com/assets/39191/10000682/8e849130-6052-11e5-9bd9-bd4505cd24d6.png)
12+
13+
## Usage
14+
15+
```shell
16+
git diff | diff-highlight | diff-so-fancy
17+
```
18+
19+
Add to .gitconfig so all `git diff` uses it.
20+
```shell
21+
git config --global core.pager "diff-highlight | diff-so-fancy | less -r"
22+
```
23+
24+
## Install
25+
26+
GNU sed. On Mac, install it with Homebrew:
27+
```shell
28+
brew install gnu-sed --with-default-names # You'll have to change below to `gsed` otherwise
29+
```
30+
31+
diff-highlight. It's shipped with Git, but probably not in your `$PATH`:
32+
```shell
33+
ln -sf "$(brew --prefix)/share/git-core/contrib/diff-highlight/diff-highlight" ~/bin/diff-highlight
34+
```
35+
36+
Add some coloring to your .gitconfig:
37+
```
38+
git config --global color.diff-highlight.oldNormal "red bold"
39+
git config --global color.diff-highlight.oldHighlight "red bold 52"
40+
git config --global color.diff-highlight.newNormal "green bold"
41+
git config --global color.diff-highlight.newHighlight "green bold 22"
42+
```
43+
44+
### npm
45+
46+
```shell
47+
npm install -g diff-so-fancy
48+
```
49+
50+
## Credit
3351

3452
Extracted from https://github.com/paulirish/dotfiles/blob/master/bin/diff-so-fancy

0 commit comments

Comments
 (0)