13 ms·
You don't need symlinks, setup scripts, etc. Try this: 1. Bare git repo in your home directory ($HOME/.files) 2. Alias for prefixing git commands ("env GIT_WO
by meagher 6y ago
You don't need symlinks, setup scripts, etc. Try this:
1. Bare git repo in your home directory ($HOME/.files)
2. Alias for prefixing git commands ("env GIT_WORK_TREE=$HOME GIT_DIR=$HOME/.files")
3. Strict .gitignore file (that ignores all files by default)
Simple to add files: `h git add .vimrc`
Have this set up for myself. Works great https://github.com/tmm/dotfiles https://github.com/tmm/dotfiles
- kenward 6y agoThis is similar to a resource that atlassian has put out on storing dotfiles [1]. It is also similar to what I use and I can vouch for this method as well. [1] https://www.atlassian.com/git/tutorials/dotfiles https://www.atlassian.com/git/tutorials/dotfiles
- shirro 6y agoNot sure if I got it from the atlassian post or the original hacker news post - I am aware of both. It don't see the need for anything more complex. My first config commit is in early 2017.
- josepmdc 6y agoThis is the simplest way of doing it and in my opinion the best. You can just have all of the files where they are supposed to be without the need of symlinks or anything. I've been doing it this way (well a bit different but very similar) and it works like a charm. I explain here the steps of how I do it: https://github.com/josepmdc/dotfiles#2-if-you-want-to-manage-your-own https://github.com/josepmdc/dotfiles#2-if-you-want-to-manage...
- sp1rit 6y agoI've been doing something similar. Basically adding a alias to my zshrc, that runs: `git --git-dir=$HOME/dotfiles --work-tree=$HOME`. And then set status.showUntrackedFiles to no. See: https://github.com/sp1ritCS/dotfiles https://github.com/sp1ritCS/dotfiles I've got this idea from the following blogpost: https://news.opensuse.org/2020/03/27/Manage-dotfiles-with-Git/ https://news.opensuse.org/2020/03/27/Manage-dotfiles-with-Gi...