Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Version controlling bashrc, etc [closed]

I want to version control all the configuration files I have in my home directory on Linux machines. Files like

.bashrc
.bash_aliases
.bash_functions
.emacs
.gitconfig
.profile

Then I could just clone the repo into my home directory on any computers I had to do work on, and keep nifty emacs macros or bash functions I create up to date on all my servers. GitHub has a lot of features that make it an attractive solution for this, but I can't clone repos into existing directories, which is a problem.

What is a good way to manage these files across all the computers I use?

like image 352
Snitse Avatar asked Nov 15 '13 18:11

Snitse


1 Answers

So the approach I use, and a lot of others use, is to have a dotfiles folder. In here you keep your .bashrc, .vimrc, etc. and create a repo of that folder. Clone this folder to all your machines, and soft link to the files using the ln command.

cd ~
mkdir dotfiles

mv .bashrc dotfiles/
#move other files

ln -s dotfiles/.bashrc .bashrc
#link other files

#do the git stuff
like image 57
Dale Myers Avatar answered Sep 23 '22 00:09

Dale Myers