githooks - Git Hook to detect branch creation -
we need write client-side git hook detect new branch creation master. whenever new branch created, folder needs deleted branch.
i not sure hook best place check or how identify if branch has been created.
a client hook tricky, as:
- it can bypassed client, ,
- is not deployed on clients.
a server hook easier (update hook), since receives 0 sha new refs.
same hook can list content of commit
git diff-tree --no-commit-id --name-only -r <sha1> # or git ls-tree -d --name-only -r <sha1>
if specific folder still there, can reject push helpful message.
Comments
Post a Comment