Here's a handy trick for using your preferred email address based on the directory context you're working in. This helps prevent accidentally committing to a Git repository with the wrong email address. Now work, personal, and freelance code commits always have the appropriate commit address.
In my home directory, I have
~/.gitconfig, the standard file for global
options. Obviously there's the global default under
[user]. The magic happens
[includeIf "…"]. Once I'm in one of those work directories, the path
based configuration will override the global default!
[user] name = Travis Miller email = email@example.com [includeIf "gitdir:~/work/broco/"] path = /Users/tmiller/work/broco/.gitconfig [includeIf "gitdir:~/work/gitlab/"] path = /Users/tmiller/work/gitlab/.gitconfig [includeIf "gitdir:~/work/travismiller/"] path = /Users/tmiller/work/travismiller/.gitconfig [includeIf "gitdir:~/work/underdogsystems/"] path = /Users/tmiller/work/underdogsystems/.gitconfig
[user] email = firstname.lastname@example.org
Recently, I acquired a new laptop for work and took the opportunity to start with a clean install. No TimeMachine, nor transfer of home directory. Just starting over with everything I now know, with a goal of keeping a manual log of everything installed or configured. Two reasons include: it'll be interesting to know, and, it will encourage slowing down and thinking through the actual need or the process of installing something.
As previously mentioned, Netlify has done a really nice job of putting together a product which exemplifies a solid, modern approach to web development. The architecture is commonly referred to as "JAMstack", and while I initially cringed at the name, I've come to embrace the moniker.