Skip to content

Commit

Permalink
Add git alias usage to docs
Browse files Browse the repository at this point in the history
Why is this change necessary?

* A git alias has the benefit of being less keystrokes than having to
  write the piped series of commands each time, and leaves the default
  behaviour of `git diff` intact.
* git aliases are tab-completed by git's default bash autocompletion.

How does it address the issue?

* Adds a section to the 'Usage' section of the README, with a git alias
  definition.
  • Loading branch information
tommarshall committed Feb 10, 2016
1 parent a1311a3 commit 5035027
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ git diff --color | diff-so-fancy
git config --global core.pager "diff-so-fancy | less --tabs=1,5 -R"
```

Or, create a git alias in your `~/.gitconfig` for shorthand fanciness:
```shell
diff-so-fancy = "!git diff --color $@ | diff-so-fancy"
```

## Install

For convenience, the recommended installation is via NPM:
Expand Down

0 comments on commit 5035027

Please sign in to comment.