Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yadmignore #508

Closed
xenoterracide opened this issue Dec 3, 2024 · 3 comments
Closed

yadmignore #508

xenoterracide opened this issue Dec 3, 2024 · 3 comments
Labels

Comments

@xenoterracide
Copy link

xenoterracide commented Dec 3, 2024

Is your feature request related to a problem? Please describe.

I don't care for yadm sharing a configuration with gitignore this has caused some heartburn for me in software development because a global gitignore is also used for all of my repo's, and there are patterns both directions I'd rather not apply, and those that I'd like to share. Related (but not the only issue) #355

Describe the solution you'd like

I would like to see a ~/.config/yadm/ignore file introduced, so I can keep them separate. Also possibly a ~/.yadmignore although I'm less enthusiastic about that, but I speculate it'd be easier to template that one, so that my ignores can share code, but not be the same.

I think this feature should also include a configuration option to disable respecting gitignore.

note: a global gitignore can also live at ~/.config/git/ignore now.

Other options

I don't consider the documented exclude file a great option because the global git ignore is still respected, and I'd speculate this particular file based on it's location either isn't yadm trackable or that's probably not a great idea to store it in yadm, you probably could, but probably not a great idea.

Additional context

bash version 5.2.37(1)-release
 git version 2.46.1
yadm version 3.2.2
@erijo
Copy link
Collaborator

erijo commented Dec 5, 2024

Have you considered setting core.excludesFile in ~/.gitconfig using includeIf? Something like the following:

# In ~/.gitconfig
[includeIf "gitdir:~/.local/share/yadm/repo.git"]
  path = .config/yadm/config

Then set core.excludesFile:

yadm config core.excludesFile '~/.config/yadm/ignore'

@xenoterracide
Copy link
Author

xenoterracide commented Dec 6, 2024

I didn't know there was such a thing as includeIf, learning about all the new features of git lately. Apparently I haven't been keeping up since 1.0. I'll try giving that a go soon(tm) where soon for me seems to take months :/ but this is less effort than some. although my git config has moved to ~/.config/git/config already.

@erijo
Copy link
Collaborator

erijo commented Dec 6, 2024

I'm closing this issue for now. Feel free to reopen it if needed.

@erijo erijo closed this as completed Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants