yadm-dev / yadm

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

Possible to ignore some file folder ? #98

Closed AndreaHasani closed 6 years ago

AndreaHasani commented 6 years ago

Is it possible to ignore some file/folder like with .gitignore? I tried putting that on ~/.yadm/repo.git but no luck there.

TheLocehiliosan commented 6 years ago

You can globally ignore paths (for all Git repos) by placing patterns in $HOME/.config/git/ignore or $HOME/.gitignore.

If you want to ignore paths only for yadm, you should be able to add patterns to $HOME/.yadm/repo.git/info/exclude. This option is a local only change, but you could have a "bootstrap" program write or copy a file to that path upon cloning.

Does this help?

AndreaHasani commented 6 years ago

Thanks that helps

tadasajon commented 3 years ago

I installed yadm via Homebrew and I do not have a $HOME/.yadm/ directory. Where do I go to exclude files?

tadasajon commented 3 years ago

I installed yadm via Homebrew and I do not have a $HOME/.yadm/ directory. Where do I go to exclude files?

Apparently the new location is $HOME/.local/share/yadm. I don't see an info/ directory, though -- and I'm still not sure how to exclude a file.

jgogstad commented 2 years ago

Add to $HOME/.local/share/yadm/repo.git/info/exclude

jgogstad commented 2 years ago

You can also just drop a .gitignore file wherever you want to ignore files

rjt commented 6 months ago

I love yadm and all the power it gives me. Would like a feature yadm ignore ~/somedir/somefile because adding !.local/share/flatpak/ to ~/.local/share/yadm/repo.git/info/exclude is not working. Preferably, this shows up when yadm is entered.

jgogstad commented 6 months ago
echo ~/.local/share/flatpak/ >> ~/.local/share/yadm/repo.git/info/exclude

no exclamation mark

rjt commented 6 months ago

Tested with adding a file under ~/.cache/ and yadm refused:) :+1: Sorry that was a bother.

**yadm exclude ~/somedir/somefile** would grease the wheels, avoiding the fear of accidentally adding a file to the git history that may never get removed. I know the yadm dev has gone to great lengths to ignore ssh keys and other items, but as you know, there is always some file that if it is made into git, it is really really hard for the more experienced to remove from the history.