Sharing configuration files

Update:
Git has a very useful ‘include’ facility to make sharing common configuration a pretty simple process.

In your ~\.gitconfig:

[include]
path = “c:/users/charles/dropbox/git/commonConfig”

Place this line early in .gitconfig; any settings in the common config file that need to be overridden on a particular computer can be included later in the local .gitconfig.

Be aware that if you want to list your global config, you will be disappointed with:
> git config –global -l

Instead, include the –includes switch to thoroughly process the included file:
> git config –global -l –includes

 


 

A number of years ago I started a new job at a software company.  A colleague walked me through the email system, network layout, and other infrastructure.  He explained how Brief was the standard editor, and was set up so everyone had a local config file that pointed to the common config file on the network.  The common config set up the necessary drive mappings, file shares, etc.  No matter what computer you logged in to, Brief was set up correctly based on your user id.

I thought of that as I find myself using SkyDrive more and more to share my own config files, script files, utilities, and other junk I want available on various computers.   It is very nice having _vimrc and my PowerShell profile always synchronized across computers, while being able to easily add computer-specific changes.
My local PowerShell profile can be identical on all computers that have a _skydrive environment variable pointing to the local SkyDrive dir:

#
# Load the common profile, shared via SkyDrive
. $env:_skydrive\PowerShell\cb_common.ps1
. $env:_skydrive\PowerShell\colorDir.ps1
# Machine-specific pieces here…

# Load posh-git example profile
. $env:_skydrive\posh-git\profile.example.ps1

Vim is configured almost identically.  In ~\_vimrc:
set runtimepath+=$_skydrive/vim
source $_skydrive/vim/_vimrcCommon

Visual Studio 2013 is doing this, now, too.  Not only does VS2013 save information in the user’s profile, but VSCommands 12 saves a whole bunch of options.

vsCommandsSync

Save to a local dir sync’d with SkyDrive, DropBox, or any one of similar services, and your VS2013 experience can be consistent across computers.

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you human? * Time limit is exhausted. Please reload CAPTCHA.

Protected with IP Blacklist CloudIP Blacklist Cloud