I commonly work on multiple computers. I have various configuration files, eg, .bashrc
, .gitconfig
, .irbrc
, .vimrc
and configuration folders, eg, .vim/
that contain valuable customizations. Sometimes I want small variations in configuration between the different computers.
I want to use version control to manage these different files.
git
; any other suggestions?A user can save current configuration to a configuration file. Through configuration file management, you can back up and restore device configurations, configure backup tasks, view backup files, import or export configuration files, and view configuration changes.
This is why most user programs define two configuration files: the first one at a "system" level, located in /etc/; and the other one, "private" to the user, that can be found in his or her home directory. For example, in my system I have installed the very useful wget utility.
The device configuration file contains information that is required to read backup data and restore the database. You can specify duplicate device configuration files. When the server updates device configuration information in the database, it also updates each file. A device configuration file cannot be recreated.
System-wide software often uses configuration files stored in /etc , while user applications often use a "dotfile" – a file or directory in the home directory prefixed with a period, which in Unix hides the file or directory from casual listing. Some configuration files run a set of commands upon startup.
I keep a folder at ~/config/
which is a bzr repository. I push/pull the repository between my various computers to sync it up. I have an install script which I use to make symlinks to my home directory:
#! /bin/sh # link all files to the home directory, asking about overwrites cd `dirname $0` SCRIPT_DIR=`pwd` SCRIPT_NAME=`basename $0` FILES=`bzr ls --versioned --non-recursive` cd $HOME for FILE in $FILES; do ln --symbolic --interactive $SCRIPT_DIR/$FILE done rm $TARGET_DIR/$SCRIPT_NAME
If you want to use git instead of bzr, you can instead use:
FILES=`git ls-tree --name-only HEAD`
(I had to ask SO to figure that out)
EDIT: I don't actually do this anymore, now I have a dotfiles repo on github, with a nice rake install script that someone else wrote.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With