yi-jiayu / blog

My blog
https://blog.jiayu.co
1 stars 0 forks source link

2019/02/conditional-git-configuration/ #9

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Conditional Git configuration - Jiayu's Blog

The situation Have you ever created a new Git repository for work on a personal machine or vice-versa, and accidentally made your first commit with the global Git email? Something like: $ git config --global user.email my@personal.email $ git init Initialized empty Git repository in /Users/yijiayu/work/project/.

https://blog.jiayu.co/2019/02/conditional-git-configuration/

kishanbsh-gilead commented 1 year ago

Beautifully explained! Thanks :-) I have a question, Is it also possible to have a pattern match sort of a flow when deciding .gitconfig? For example say

Within work say there are differences something like