File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,34 +62,26 @@ hunk show HEAD~1 # review an earlier commit
6262
6363## Git integration
6464
65- Use Hunk directly for full-screen review:
65+ You can set Hunk as your Git pager so ` git diff ` and ` git show ` open in Hunk automatically.
6666
67- ``` bash
68- hunk diff
69- hunk diff --staged
70- hunk diff main...feature
71- hunk show
72- hunk stash show
73- ```
74-
75- Use Hunk as a Git pager for diff-like output:
67+ From the terminal:
7668
7769``` bash
78- git config --global core.pager ' hunk patch - '
70+ git config --global core.pager " hunk pager "
7971```
8072
81- Or scope it just to ` diff ` and ` show ` :
73+ Or in your Git config :
8274
83- ``` bash
84- git config --global pager.diff ' hunk patch - '
85- git config --global pager.show ' hunk patch - '
75+ ``` ini
76+ [core]
77+ pager = hunk pager
8678```
8779
88- Use Hunk as a Git difftool :
80+ If you’d rather keep Git’s default ` diff ` and ` show ` behavior, you can add optional aliases instead :
8981
9082``` bash
91- git config --global diff.tool hunk
92- git config --global difftool.hunk.cmd ' hunk difftool "$LOCAL" "$REMOTE" "$MERGED" '
83+ git config --global alias.hdiff " -c core.pager= \" hunk pager \" diff "
84+ git config --global alias.hshow " -c core.pager= \" hunk pager \" show "
9385```
9486
9587## Examples
You can’t perform that action at this time.
0 commit comments