Explore >> Select a destination


You are here

zzamboni.org
| | blog.kulman.sk
2.0 parsecs away

Travel
| | 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...
| | purefun.dev
2.7 parsecs away

Travel
| | 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?
| | connorberry.com
3.2 parsecs away

Travel
| | Git with Vimdiff One time view: git difftool --tool=vimdiff --no-prompt Always: git config --global diff.tool vimdiff git config --global merge.tool vimdiff For Single Repository: git config diff.tool vimdiff git config merge.tool vimdiff To avoid having Git prompt when launching Vimdiff: git config --global difftool.prompt false
| | jinyuz.dev
20.9 parsecs away

Travel
| Suppose that you have a full time job at Amazon, and you want to separate your git commit emails from Amazon and your personal projects. Setting up ~/.gitconfig $ touch ~/.gitconfig For our personal projects, we will use the ~/.gitconfig file with the following content: [user] name = James Banned email = james.banned@gmail.com [includeIf "gitdir:~/Work/"] path = ~/.gitconfig.work The includeIf basically means that include this config if I'm inside the ~/Work/ directory.