It's time to make as many as possible configuration files under version control.
This can also help me to sync configurations among computers or systems.
This repo contains several submodules, to make it simple, use git clone --recursive (or git c if you are using git config provided by this repo).
Otherwise, use git submodule init and git submodule update after a normal clone.
To update all submodules, run git submodule foreach git pull.
Private or sensitive personal configurations should not be included in public repos.
They are stored in _personal folder, which is ignored by git.
To version control these files, use a private repo and clone it to _personal folder.
cd $DOTFILES_HOME
git clone git@github.com:USER/dotfiles-private _personalGenerally speaking, to use these configurations, just create symbol links from cloned folder to the desired destination.
On Linux and MacOS, simply use ln -s TARGET LINK_NAME to create symbol links.
On Windows, there are several ways:
- Use
junction LINK_NAME TARGET_FOLDERto create junction (soft) link to a folder; - Use
ln.exe TARGET_FILE LINK_NAMEto create hard link to a file. But the target and link name must be in the same driver. - Use
mklink(should run as adiministrator) to create either kind of link:mklink LINK_NAME TARGETto create a symbol link file.mklink /d LINK_NAME TARGETto create a symbol link to a folder.mklink /j LINK_NAME TARGETto create a junction.mklink /h LINK_NAME TARGETto create a hard link.