Re:Getting 10TB of GitHub Logs and Extracting Details of All...
by 0x0 on Thursday June 15, 2023 @02:38PM
(#36344787)
You can have includeIf sections in your .gitconfig that applies only to things within a certain directory. So you if you create top level directories in your $HOME for your various identities, all you need to do is to make sure you are cloning into and working within the appropriate directory hierarchy.
[ Parent
| on HN ]
Re:Getting 10TB of GitHub Logs and Extracting Details of All...
by mplewis9z on Thursday June 15, 2023 @03:49PM
(#36345559)
I do this to separate personal and company repositories on the same machine, and it works flawlessly. An example config looks like:
~/.gitconfig:
```
[includeIf "gitdir:~/Personal/"]
path = ~/personal.gitconfig
```~/personal.gitconfig:
```
[user]
email = {personal email address}
```And you can have arbitrary numbers of "profiles" like this, as long as each is in their own directory.