1

I have a post-receive hook that create a file after a push on master branch

branch_name=$(git rev-parse --symbolic --abbrev-ref $refname) if [ "master" == "$branch_name" ]; then touch OK_push.txt fi 

Is it possible to do the same thing after a merge (or pull) between one branch on master branch?

1 Answer 1

1

If you read through the list of available hooks, you see that there is a post-merge hook...

...but it's not clear from your question that this will do what you want. A post-receive hook runs on a remote git repository after receiving updates from a client, while a post-merge hooks runs in your local repository after a merge operation (including git pull, unless you've set git to rebase rather than merge).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.