4 ms·
To complete the description of the workflow (for others), you can replicate your home directory on a new machine using the following command: git clone --se
by seliopou 11y ago
To complete the description of the workflow (for others), you can replicate your home directory on a new machine using the following command:
git clone --separate-git-dir=~/.myconf /path/to/repo ~
This is the best solution I've seen so far, and I may adopt it next time I get the itch to reconfigure my environment.
- telotortium 11y agoFor posterity, note that this will fail if your home directory isn't empty. To get around that, clone the repo's working directory into a temporary directory first and then delete that directory, git clone --separate-git-dir=$HOME/.myconf /path/to/repo $HOME/myconf-tmp cp ~/myconf-tmp/.gitmodules ~ # If you use Git submodules rm -r ~/myconf-tmp/ alias config='/usr/bin/git --git-dir=$HOME/.myconf/ --work-tree=$HOME' and then proceed as before.
- durdn 11y agoI found out exactly the same problem :)