I discovered that you can have git use the pager you like so I set it to my darling : bat git config --global core.pager bat https://github.com/sharkdp/bat/
Is there an advantage to doing this over setting the GIT_PAGER environment variable? (Weirdly, git doesn't seem to honour the PAGER var (which would be even better), although its man page claims it does)
How Core Git Developers Configure Git
91–100 of 129 posts
Re: How Core Git Developers Configure Git
#92I discovered that you can have git use the pager you like so I set it to my darling : bat git config --global core.pager bat https://github.com/sharkdp/bat/
Is there an advantage to doing this over setting the GIT_PAGER environment variable? (Weirdly, git doesn't seem to honour the PAGER var (which would be even better), although its man page claims it does)
If you use --local instead of --global, you can configure just for the current repository, useful if may find that delta is or isn't the best choice just for that repository
Re: How Core Git Developers Configure Git
#93How much of this is for a noob like me that just uses vscode? I hardly ever see the git command line, and when I do see it, its trouble beyond what anybody can fix...
Setting merge conflictstyle diff3 or zdiff3 will improve your experience if you ever do any merging
Re: How Core Git Developers Configure Git
#94My config if you'd like to steal it, also here: https://github.com/silvanocerza/dotfiles/blob/master/git/git...
Mind that you need diff-so-fancy for this work correctly. https://github.com/so-fancy/diff-so-fancy
[alias]
co = checkout
ci = commit
cl = clone
st = status
f = fetch
br = branch
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) %C(bold green)(%ar)%C(reset) %C(yellow)- %an%C(reset)%C(auto)%d%C(reset)%n" "%C(white)%s%C(reset)' --all
lgg = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
type = cat-file -t
dump = cat-file -p
# Lists all local branches that have been deleted on remote
gone = ! "git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" {print $1}' | xargs git branch -D"
[color]
ui = true
[push]
default = simple
[merge]
tool = meld
conflictStyle = zdiff3
[diff]
algorithm = histogram
colorMoved = dimmed-zebra
colorMovedWS = no
mnemonicPrefix = true
renames = true
[rerere]
enabled = true
[pager]
branch = false
[core]
pager = diff-so-fancy | less --tabs=4 -RFX
fsmonitor = true
untrackedCache = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = bold
newHighlight = green bold 22
[color "diff"]
meta = yellow
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[diff-so-fancy]
markEmptyLines = false
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[pull]
rebase = false
[init]
defaultBranch = main
[column]
ui = auto
[branch]
sort = -committerdate
[commit]
verbose = trueRe: How Core Git Developers Configure Git
#95Earlier quoted context omitted.
After using delta for a while, I'm going back to the regular diff view... it's not that it isn't good, but I'm constantly copying diffs (yes, I know I can generate patches) and the pretty output breaks that workflow. Also, when your terminal is a bit small it's a bit hard to see things. But it's really good software, I recommend anyone who's reading to give it a try.
Isn't copying without the formatting just a ` | pbcopy` away?
Aside: Gemini mentioned it didn't want me to ask it questions about bikeshedding what shade of blue on a website header so I think it's got our number.
Re: How Core Git Developers Configure Git
#96Re: How Core Git Developers Configure Git
#97Re: How Core Git Developers Configure Git
#98Earlier quoted context omitted.
Yeah, I didn't do aliases on purpose, because I wanted everything to be fairly global, where I feel like aliases are more personal. But yes, aliases are great.
as for me, I want something more. Like git shell. Where I no need to write git, git, git again and again. Strange that there is no something like this yet.