3 ms·
The point is managing single files, not directories. Want to version control your ~/.bashrc, for example? Or a single document? You can do that without having t
by vertex-four 12y ago
The point is managing single files, not directories. Want to version control your ~/.bashrc, for example? Or a single document? You can do that without having to move the file into its own directory in some hackish way.
- shabble 12y agoGNU Stow[1] referencing a git repo in ~/.dotfiles is what I use for that. You might consider it hackish, but at least there are plenty of tools out there for managing it :) [1] https://www.gnu.org/software/stow/ https://www.gnu.org/software/stow/
- Karunamon 12y agoHow is this different from just `init`ing the repo in your home directory and only adding files you care about?
- desdiv 12y agoWhat happens if you accidentally git clean -dfx?
- Karunamon 12y agoRoughly the same thing that happens if you run rm -rf ~. Any tool that manipulates files can be coaxed into shooting you in the foot. Any usage of -f on a git command means you're probably doing something that you shouldn't be unless you absolutely know better.
- mitchty 12y agoYou can always just set GIT_REPO_DIR to a bare/remote git repo and not have to move crap around if you don't want to. git is a bit more flexible than how its normally used.