Skip to content

Commit

Permalink
Split gitconfig into common and OS specific
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangrosshauser committed Apr 8, 2020
1 parent 3172da1 commit 647d404
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 30 deletions.
51 changes: 23 additions & 28 deletions gitconfig → gitconfig-common
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,58 @@
name = Julian Grosshauser
email = julian@juliangrosshauser.com
signingkey = 0A89880268262E52
[credential]
helper = osxkeychain

[core]
editor = vim
autocrlf = input
safecrlf = false
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
# Make rebase save on macOS
trustctime = false

[help]
format = web
autocorrect = 1

[alias]
ls = ls-files
ign = ls-files -o -i --exclude-standard

[branch]
autosetupmerge = true
autosetuprebase = always

[push]
default = simple

[commit]
gpgsign = true

[gpg]
program = gpg

[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f

[color]
ui = true

[color "branch"]
current = white
local = blue
remote = green

[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse

[color "status"]
added = yellow
changed = green
untracked = cyan
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[diff]
tool = Kaleidoscope
compactionHeuristic = true
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" \"$REMOTE\"
[mergetool]
keepBackup = false
prompt = false
[merge]
tool = Kaleidoscope
[hub]
protocol = https
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[commit]
gpgsign = true
[gpg]
program = gpg

[include]
path = ~/.gitconfig-os-specific
29 changes: 29 additions & 0 deletions gitconfig-macos
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[core]
# Make rebase save on macOS
trustctime = false

[credential]
helper = osxkeychain

[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"

[difftool]
prompt = false

[diff]
tool = Kaleidoscope
compactionHeuristic = true

[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" \"$REMOTE\"

[mergetool]
keepBackup = false
prompt = false

[merge]
tool = Kaleidoscope

[hub]
protocol = https
2 changes: 2 additions & 0 deletions gitconfig-wsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[credential]
helper = /mnt/c/Program\\ Files/Git/mingw64/libexec/git-core/git-credential-manager.exe
21 changes: 19 additions & 2 deletions install.conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,30 @@
~/.zshenv:
~/.aliases:
~/.expand-aliases:
~/.gitconfig:
~/.gitconfig: gitconfig-common
~/.asdfrc:
~/.default-gems:
~/.gemrc:
~/.npmrc:
~/.condarc:
~/.vimrc:
~/.tmux.conf:
~/.lldbinit:

# WSL

- defaults:
link:
if: '[[ $(uname -r) == *"microsoft"* ]]'

- link:
~/.gitconfig-os-specific: gitconfig-wsl

# macOS

- defaults:
link:
if: '[ $(uname) = Darwin ]'

- link:
~/.gitconfig-os-specific: gitconfig-macos
~/.lldbinit:

0 comments on commit 647d404

Please sign in to comment.