Syncing dotfiles
From FVue
Problem
I'd like the machines I work on to have the same configuration, i.e. the same dotfiles.
See also: https://wiki.archlinux.org/title/Dotfiles
Solution
GitHub - anishathalye/dotbot: A tool that bootstraps your dotfiles.
Plugins are git submodules preferably.
Add submodule
~/.dotfiles$ git submodule add https://github.com/tpope/vim-rails vim/pack/plugins/start/vim-rails
Update submodules
- git submodule update
- Git will go into your submodules and fetch and update for you, but as specified in the index of the superproject
- git submodule update --remote [SUBMODULE]
- Git will by default try to update all of your submodules. Instead of using the superproject’s recorded SHA-1 to update the submodule, use the status of the submodule’s remote-tracking branch. This is equivalent to running git pull in each submodule, which is generally exactly what you want.
- git submodule update --init --recursive
# Short-hand version of going into each submodule and do a `git checkout master; git pull`. # Options: # --recursive: in case you have submodules within submodules git submodule foreach --recursive git pull origin master # Now the submodules are in the state you want, so git commit -am "Pulled down update to submodule_dir"
Journal
20140206
- GitHub does dotfiles
- Tips and tricks storing your dotfiles on GitHub
- vcs-home
- Mailing list figuring out how to use version control systems to manage your documents