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?
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
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