GitToolBox icon indicating copy to clipboard operation
GitToolBox copied to clipboard

[Feature] Locked branches (no commit, no push)

Open zielu opened this issue 4 years ago • 3 comments

I always work with multiple branches, and we have some branches that we are not allowed to push or commit anything, I know we can manage this on the admin setting, but on our machine, if there is a way where we can add few branches which shows the locked symbol so that we can not commit or push the code by mistake.

zielu avatar Nov 29 '21 08:11 zielu

Nice idea for some branches!

scruel avatar Dec 08 '21 01:12 scruel

So what would we useful here is visual indication of branch being locked ?

Preventing commit is not hard - just implement another pre commit handler.

If we are talking actively preventing push, it requires doing one of two ugly things:

  • using bytecode manipulation to inject advice around JB Git plugin's code
  • adding pre-push hook which becomes problematic if user already has one (git supports only single hook script)

zielu avatar Dec 09 '21 19:12 zielu

I really like the visual indicator idea.

Not sure the pre-commit-hook is something I'd like an IDE plugin to interfere with, though.

mastacheata avatar Jan 03 '22 11:01 mastacheata