|
You are here |
zzamboni.org | ||
| | | | |
purefun.dev
|
|
| | | | | If you install a new machine and forget to set your email and commiter name, then your Git history will be a tad ugly, with your machine name involved instead of a real email. So how do you set the default? Like this: git config --global user.name "Alice E" git config --global user.email "alice@example.org" Override per repo Ideally, do it before you start committing things. But what if you want different committer names and emails depending on the context? | |
| | | | |
blog.kulman.sk
|
|
| | | | | I use the same machines to work on both personal and work projects. I usually have to use a different Git identity for the work projects than for my personal projects. Previously I had my personal Git identity set globally and then used local Git configs to override it in work projects. This worked just fine but it was too much work. There is a better solution. Git config allows you to use, or better to say include, another Git config for a specific directory and all its subdirectories. I have all my pro... | |
| | | | |
wittchen.io
|
|
| | | | | Short introduction Sometimes people need to specify multiple values for single .gitconfig file or they want to share just part of the configuration between two machines. There are different approaches for that. I can show you mine. Different configs for different Operating Systems On my private computer, I use Linux. I use Git for my private projects and I use my private e-mail address there. At the same time, I use Git at work on macOS with exactly the same Git configuration, but with a different e-mail... | |
| | | | |
blog.bdw.li
|
|
| | | Using different machines to work on some git files can result in missing signign keys and some headache. | ||