foriequal0/git-trim

Feature Request - ignore some branches

sixcy opened this issue · 3 comments

sixcy commented

Hello (again),

I'm working on a project consisting in a fork of another project. Our master branch is the one from the original repository we forked - we merge master with our own development branch from time to time to make sure we have the latest development of their end.

It is possible to set another branch as a base with the -b option - however, when setting our development branch as base, the --dry-run indicates that the master branch would be deleted (since it has been merged with our development branch). It is important for us to keep this master branch intact.

Could it be possible in the future to provide an option telling git-trim to ignore certain branches? So that, in our specific use case, the master branch would be preserved

Thanks for this project !

Have you tried a protected option? https://github.com/foriequal0/git-trim#git-config-trimprotected
Also multiple base branches can be set. develop,master is already a default and it will prevent them to be beleted.
(sorry for deleting and editing the comments. I'm not familiar with writing a comment without a ton of edits)

sixcy commented

Right, I did not see it was possible to include multiple base branches - I saw the protected option in --help but there was no help there. I did not think of reading the "Configurations" section neither

sixcy commented

Well it works wonders that way. Thanks again!