How to trigger git hooks without pushing to the repo

343 views Asked by At

I'm writing a web editor plugin for a code repository web application. My editor edits the file on the remote branch, and commits it there. To the user it looks like they committed changes on there local machine and pushed the changes, where in reality the file was edited on the remote branch and committed.

The issue with this approach is that I am bypassing all the hooks that are triggered with a push. I dont want to clone the repository on the server and push because that could take a lot of time if the repository is large. Is there any way for me to change the remote branch on the server and trigger the git hooks without making a clone of the repository and pushing the changes?

0

There are 0 answers