In my ~/.gitconfig
, I list my personal email address under [user]
, since that\'s what I want to use for Github repos.
But, I\'ve recently s
GIT_AUTHOR_EMAIL
+ local .bashrc
.bashrc_local
: don't track this file, put it only on your work computer:
export GIT_AUTHOR_EMAIL='me@work.com'
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
.bashrc
: track this file, make it the same on both work and home computers:
F="$HOME/.bashrc_local"
if [ -r "$F" ]; then
. "$F"
fi
I'm using https://github.com/technicalpickles/homesick to sync my dotfiles.
If only gitconfig would accept environment variables: Shell variable expansion in git config