yadm-dev / yadm

Yet Another Dotfiles Manager
https://yadm.io/
GNU General Public License v3.0
5.11k stars 175 forks source link

How to stop yadm overwriting untracked files? #493

Closed Squirreljetpack closed 1 month ago

Squirreljetpack commented 2 months ago

This issue is about

Describe the issue

When I run yadm pull it auto applies symlinks. For example, .gitconfig##os.Darwin overwrites .gitconfig. (.gitconfig is untracked) For example, a program may write variable data to the config (not ideal but still). Or you might to just deploy a base version and write out the rest yourself on a specific pc without committing it (you could have it target bin2.conf or something but this is more annoying than having an option to not overwrite). Or a merge conflict could break an important config. I have seen warnings about overwriting untracked files but only a few times, and every pull overwrites. Is there an option to disable overwriting specific files (that is, with symlinks)?

Also, is there a .gitattributes file for yadm?

Squirreljetpack commented 1 month ago

the solution could be to use bootstrapping to create .gitignore and .gitattribute files in $HOME/.yadm/repo.git/info/exclude