Does IntelliJ IDEA still support post-commit hooks?

已回答

Searches of the forum seem to suggest that Intellij IDEA once supported post-commit hooks, but I've been unable to set up any in my own environment so far. Is it still possible, and, if so, are there any resources that explain how to do it?

0

Hi,

We support all git hooks. As long they are configured properly, they will be run when you commit from IDE. 

Can you share some details what are you trying to setup and how idea can help? 

0

Right now, I'd like to be able to run a post-commit hook that only prints a simple output message. I'm not sure I'm able to successfully any hooks, at the moment. I'm not seeing any changes take effect from the prepare-commit-msg file I'd edited, either.

0

How did you set it up? Is the hook run when you commit from terminal? 

If it works via terminal, it will definitely work via ide. 

0

Doesn't run from the terminal. 

One example is the commit-msg file (originally commit-msg.sample) that was created by default in the .git folder of my project. All it does it print an output message. I removed the .sample extension and changed the settings on the file to make it executable. When I commit a change, however, I don't see any output, whether committing via command terminal or within IDEA.

0

In order for it to run via IDE, it must be runnable from the terminal. I do not know how to help further as it seems you have take all the steps.  Please see: https://serverfault.com/questions/590828/git-post-commit-post-receive-hook-not-working

0

请先登录再写评论。