Split gitconfig in work and personal use
This commit is contained in:
parent
e8310c4705
commit
9e43aac020
13
gitconfig
13
gitconfig
@ -1,3 +1,11 @@
|
||||
# default to personal config
|
||||
[include]
|
||||
path = ~/.gitconfig.personal
|
||||
|
||||
# when working on work projects
|
||||
[includeIf "gitdir:**/work/**/.git"]
|
||||
path = ~/.gitconfig.work
|
||||
|
||||
[credential]
|
||||
helper = cache
|
||||
[credential "https://dev.azure.com"]
|
||||
@ -5,11 +13,8 @@
|
||||
[credential "https://git.cmtec.se"]
|
||||
helper = store
|
||||
username = cm
|
||||
[user]
|
||||
name = Christoffer Martinsson
|
||||
email = cm@cmtec.se
|
||||
[pull]
|
||||
rebase = false
|
||||
rebase = false
|
||||
[merge]
|
||||
tool = nvimdiff
|
||||
[mergetool]
|
||||
|
||||
3
gitconfig.personal
Normal file
3
gitconfig.personal
Normal file
@ -0,0 +1,3 @@
|
||||
[user]
|
||||
name = Christoffer Martinsson
|
||||
email = cm@cmtec.se
|
||||
7
gitconfig.work
Normal file
7
gitconfig.work
Normal file
@ -0,0 +1,7 @@
|
||||
[user]
|
||||
name = Christoffer Martinsson
|
||||
email = christoffer.martinsson@mildef.com
|
||||
|
||||
[credential "https://git.mildef.com"]
|
||||
helper = store
|
||||
username = christoffer
|
||||
@ -328,6 +328,8 @@ ln -sf ~/code_server/config/nvim/init.lua ~/.config/nvim/init.lua
|
||||
# Symlink git config
|
||||
printf -- '\033[33m Symlinking git config\n\033[37m'
|
||||
ln -sf ~/code_server/gitconfig ~/.gitconfig
|
||||
ln -sf ~/code_server/gitconfig.personal ~/.gitconfig.personal
|
||||
ln -sf ~/code_server/gitconfig.work ~/.gitconfig.work
|
||||
|
||||
# Symlink tmux config
|
||||
printf -- '\033[33m Symlinking tmux config\n\033[37m'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user