-
-
Notifications
You must be signed in to change notification settings - Fork 756
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
Feature request: exclude files specified in .gitignore #937
Comments
Considering there is a ton of other software having its own "ignore" or "exclude" list, i would find a |
hmm.. yeah, you've got a point there.. |
this is somehow closely related to #641, so I'll close this one - we can discuss there. |
Great suggestion - I was thinking about the same. I agree that this isn't a git-related software and I don't suggest to call it |
Another thing to consider with git repos is that the list of files depends on a branch one is at. Thus if regular backups are enabled, sometimes you would be on branch I'm thinking the best approach is not to backup "active" git repositories at all and instead either use |
@tomaskikutis Not sure if this approach is a good idea. What if there are files one is currently working on (not commited yet)? These won't be backed up then. Using git bundle would be difficult I guess, because borg restore works on filesystem basis. How and where would you save the bundles? |
I hope I'll never need my backups. In case I do, losing uncomitted code would be a very minor inconvenience.
Backup location needs to be picked regardless if one backs up using |
Well, that might work for you but not for everybody :-)
I see, well, in that case you could have all your git repos ending with |
After using my approach for a while I realized it's not ideal since I still need to write custom code to get it working. A good generic solution would be if borgbackup supported custom backup strategies for certain folders. Strategies themselves could be 3rd party plugins if including this in core is not desired. I imagine it working similar to For example, with |
It would be great if there was an option "--exclude-gitignore" that enables exclusion of files specified in .gitignore.
When a .gitignore file exists in a directory, all rules in it could be converted to regex patterns at runtime like this:
I have no clue how to handle gitignore excludes like "!/includefile"...
The text was updated successfully, but these errors were encountered: