
blog.kulman.sk/different-git-config-for-work-projects
Preview meta tags from the blog.kulman.sk website.
Linked Hostnames
6- 14 links toblog.kulman.sk
- 2 links togithub.com
- 1 link tobuymeacoffee.com
- 1 link togohugo.io
- 1 link tohachyderm.io
- 1 link tolinkedin.com
Search Engine Appearance
Using different Git config for personal and work projects
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 projects stored in ~/Projects and subdirectories like ~/Projects/open-source and work projects in ~/Projects/CompanyName. I created a ~/.companyName.gitconfig that overrides just the name, email and GPG signing key to match the work identity [user] name = Igor Kulman email = [email protected] signingkey = ABC I then included this config in my main ~/.gitconfig just for the ~/Projects/CompanyName directory [user] name = Igor Kulman email = [email protected] signingkey = DEF ... [includeIf "gitdir:~/Projects/CompanyName/"] path = ~/.companyName.gitconfig to achieve exactly what I needed. To verify and quickly check which Git identity is being used in a specific Git repository you can use this simple Git alias [alias] whoami = "! git var -l | grep '^GIT_.*_IDENT'"
Bing
Using different Git config for personal and work projects
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 projects stored in ~/Projects and subdirectories like ~/Projects/open-source and work projects in ~/Projects/CompanyName. I created a ~/.companyName.gitconfig that overrides just the name, email and GPG signing key to match the work identity [user] name = Igor Kulman email = [email protected] signingkey = ABC I then included this config in my main ~/.gitconfig just for the ~/Projects/CompanyName directory [user] name = Igor Kulman email = [email protected] signingkey = DEF ... [includeIf "gitdir:~/Projects/CompanyName/"] path = ~/.companyName.gitconfig to achieve exactly what I needed. To verify and quickly check which Git identity is being used in a specific Git repository you can use this simple Git alias [alias] whoami = "! git var -l | grep '^GIT_.*_IDENT'"
DuckDuckGo

Using different Git config for personal and work projects
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 projects stored in ~/Projects and subdirectories like ~/Projects/open-source and work projects in ~/Projects/CompanyName. I created a ~/.companyName.gitconfig that overrides just the name, email and GPG signing key to match the work identity [user] name = Igor Kulman email = [email protected] signingkey = ABC I then included this config in my main ~/.gitconfig just for the ~/Projects/CompanyName directory [user] name = Igor Kulman email = [email protected] signingkey = DEF ... [includeIf "gitdir:~/Projects/CompanyName/"] path = ~/.companyName.gitconfig to achieve exactly what I needed. To verify and quickly check which Git identity is being used in a specific Git repository you can use this simple Git alias [alias] whoami = "! git var -l | grep '^GIT_.*_IDENT'"
General Meta Tags
11- titleUsing different Git config for personal and work projects - Igor Kulman
- charsetutf-8
- X-UA-CompatibleIE=edge
- viewportwidth=device-width, initial-scale=1, shrink-to-fit=no
- theme-color
Open Graph Meta Tags
4- og:titleUsing different Git config for personal and work projects
- og:descriptionI 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 projects stored in ~/Projects and subdirectories like ~/Projects/open-source and work projects in ~/Projects/CompanyName. I created a ~/.companyName.gitconfig that overrides just the name, email and GPG signing key to match the work identity [user] name = Igor Kulman email = [email protected] signingkey = ABC I then included this config in my main ~/.gitconfig just for the ~/Projects/CompanyName directory [user] name = Igor Kulman email = [email protected] signingkey = DEF ... [includeIf "gitdir:~/Projects/CompanyName/"] path = ~/.companyName.gitconfig to achieve exactly what I needed. To verify and quickly check which Git identity is being used in a specific Git repository you can use this simple Git alias [alias] whoami = "! git var -l | grep '^GIT_.*_IDENT'"
- og:typearticle
- og:urlhttps://blog.kulman.sk/different-git-config-for-work-projects/
Twitter Meta Tags
3- twitter:cardsummary
- twitter:titleUsing different Git config for personal and work projects
- twitter:descriptionI 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 projects stored in ~/Projects and subdirectories like ~/Projects/open-source and work projects in ~/Projects/CompanyName. I created a ~/.companyName.gitconfig that overrides just the name, email and GPG signing key to match the work identity [user] name = Igor Kulman email = [email protected] signingkey = ABC I then included this config in my main ~/.gitconfig just for the ~/Projects/CompanyName directory [user] name = Igor Kulman email = [email protected] signingkey = DEF ... [includeIf "gitdir:~/Projects/CompanyName/"] path = ~/.companyName.gitconfig to achieve exactly what I needed. To verify and quickly check which Git identity is being used in a specific Git repository you can use this simple Git alias [alias] whoami = "! git var -l | grep '^GIT_.*_IDENT'"
Item Prop Meta Tags
6- nameUsing different Git config for personal and work projects
- descriptionI 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 projects stored in ~/Projects and subdirectories like ~/Projects/open-source and work projects in ~/Projects/CompanyName. I created a ~/.companyName.gitconfig that overrides just the name, email and GPG signing key to match the work identity [user] name = Igor Kulman email = [email protected] signingkey = ABC I then included this config in my main ~/.gitconfig just for the ~/Projects/CompanyName directory [user] name = Igor Kulman email = [email protected] signingkey = DEF ... [includeIf "gitdir:~/Projects/CompanyName/"] path = ~/.companyName.gitconfig to achieve exactly what I needed. To verify and quickly check which Git identity is being used in a specific Git repository you can use this simple Git alias [alias] whoami = "! git var -l | grep '^GIT_.*_IDENT'"
- datePublished2020-12-02T05:29:12+01:00
- dateModified2020-12-02T05:29:12+01:00
- wordCount206
Link Tags
10- apple-touch-iconhttps://blog.kulman.sk/apple-touch-icon.png
- canonicalhttps://blog.kulman.sk/different-git-config-for-work-projects/
- iconhttps://blog.kulman.sk/favicon.ico
- preloadhttps://blog.kulman.sk/theme.png
- preloadhttps://blog.kulman.sk/images/avatar.jpg
Links
20- https://blog.kulman.sk
- https://blog.kulman.sk/a-few-xcode-debugging-tips
- https://blog.kulman.sk/about
- https://blog.kulman.sk/automatically-merge-xcode-project-conflicts
- https://blog.kulman.sk/bluetooth-headphone-switching-macos