Repository to keep track of my dot-files
There's a .git
file in $HOME that points to this repository.
gitdir: /path/to/this/gitdir/.git
To clone this repository in a new machine, it needs a sequence of steps.
- Clone the repository using
--bare
flag - Add the
.git
file as described above git checkout
andgit reset
from $HOME
See this ansible script for the actual commands to run.
Some people have set core.worktree
in their configuration to allow for this
kind of a setup, but that doesn't play well with magit
. Some people have
documented their setup here:
- https://www.wangzerui.com/2017/03/06/using-git-to-manage-system-configuration-files/
- https://drewdevault.com//2019/12/30/dotfiles.html
- https://stackoverflow.com/a/31841738
@tarsius
recommends using a .git
file in the worktree ($HOME
) that
points to the gitdir
.
Adding new files is a little bit of a pain with the necessity to add it with
git add -f
, and there not being a simpler magit
-like way of doing it.
May be some directories should be excluded in .gitignore
to make this easier?