Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


GNU 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/


How is this different from just `init`ing the repo in your home directory and only adding files you care about?


What happens if you accidentally git clean -dfx?


Roughly 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.


You 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: