jasonmccreary/git-trim

Question about how to use

jamesmills opened this issue · 1 comments

‪Should you checkout the master/develop branch and run this on those rather than on a feature branch? I’m assuming so? Is it possible to output a message/warning to the user to remind them of this?

Behavior is very contextual based on the options you use. So it depends.

The fundamental thing to remember is git trim will never remove the current branch. Furthermore, options like --merge, use the current branch to determine the state of other branches, i.e. is the branch merged into the current branch.

To try and answer your specific question, I would say, yes, in most cases you would likely want to run git trim from your primary branch (e.g. master or main).

Since you mentioned develop, if you have multiple branches you would never want to remove, check out the new configuration.