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

optimize and more readable obsidian extended gitignore #4599

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JumpIn-Git
Copy link

Reasons for making this change

the old extended obsidian gitignore had 3 options that wouldnt immediately make sense to some users, i have optimzed them to 2 and made them more readable

the updated documentation might need to be changed, just leave a suggestion

Merge and Approval Steps

  • Confirm that you've read the contribution guidelines and ensured your PR aligns
  • Ensure CI is passing
  • Get a review and Approval from one of the maintainers

@wirecat
Copy link
Collaborator

wirecat commented Mar 7, 2025

@JumpIn-Git I don't think this maintains the same behavior. Could you please provide some more background information on why we should make this change?

@JumpIn-Git
Copy link
Author

JumpIn-Git commented Mar 8, 2025

right now, it uses these rules:

.obsidian/plugins/**/*
!.obsidian/plugins/*/
!.obsidian/plugins/*/data.json

this can be confusing for some users, and what i have made

.obsidian/plugins/*/**
!.obsidian/plugins/*/data.json

does the same and should make some more sense.

here are some git commands to prove its working:

obs on  main [✘!] 
❯ git rm --cached -r .obsidian/
rm '.obsidian/app.json'
rm '.obsidian/appearance.json'
rm '.obsidian/community-plugins.json'
rm '.obsidian/core-plugins.json'
rm '.obsidian/graph.json'
rm '.obsidian/plugins/obsidian-git/data.json'
rm '.obsidian/plugins/obsidian-style-settings/data.json'
rm '.obsidian/themes/Catppuccin/manifest.json'
rm '.obsidian/themes/Catppuccin/theme.css'
obs on  main [✘!?] 
❯ git add .
obs on  main [✘+] 
❯ git ls-files
.gitignore
.obsidian/app.json
.obsidian/appearance.json
.obsidian/community-plugins.json
.obsidian/core-plugins.json
.obsidian/graph.json
.obsidian/plugins/obsidian-git/data.json
.obsidian/plugins/obsidian-style-settings/data.json
.obsidian/themes/Catppuccin/manifest.json
.obsidian/themes/Catppuccin/theme.css
sheikunde.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants