I have a git repo test, and a file (zsh config file), and
ln ~/.zshrc test/zshrc
then I changed .zshrc file,the zshrc file in git repo didn't change,is that git cannot deal with hardlink?
if so, how can I use git to manage these dotfiles?any suggestion
You can't make¹ hard links outside a git repository. You have several choices:
~/.zshrc
a symbolic link to my-home-git-checkout/zshrc
.¹ Yeah, ok, quibble: you can't keep.
Git always assumes that he is a only owner of a file inode. So git checkout just breaks all hard links.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With