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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -