Skip to content

Instantly share code, notes, and snippets.

@daopk
Last active January 20, 2025 07:25
Show Gist options
  • Save daopk/51409234f1b1f9f590555dfbaaaf0649 to your computer and use it in GitHub Desktop.
Save daopk/51409234f1b1f9f590555dfbaaaf0649 to your computer and use it in GitHub Desktop.
This is how I manage multiple gitconfig files
[alias]
c = checkout
cm = commit -m
s = status
b = branch
hide = update-index --assume-unchanged
unhide = update-index --no-assume-unchanged
hidden = !git ls-files -v | grep ^h
[includeIf "gitdir:~/Workspace/work/"]
path = ~/.gitconfig-work
[includeIf "gitdir:~/Workspace/apps/"]
path = ~/.gitconfig-personal
[includeIf "gitdir:~/Workspace/personal/"]
path = ~/.gitconfig-personal
[init]
defaultBranch = main
[push]
autoSetupRemote = true
[pull]
rebase = false
[user]
name = Phan Khắc Đạo
email = [email protected]
[user]
name = My Work Name
email = [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment