foriequal0 / git-trim

Automatically trims your branches whose tracking remote refs are merged or stray
MIT License
492 stars 14 forks source link

Feature Request - ignore some branches #63

Closed sixcy closed 4 years ago

sixcy commented 4 years ago

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 !

foriequal0 commented 4 years ago

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 4 years ago

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 4 years ago

Well it works wonders that way. Thanks again!