Answer the question
In order to leave comments, you need to log in
GIT: How to get the name of the branch being merged?
Hello everyone, I am writing a small set of hooks for the git and I ran into the following problem: how to correctly get the name of the merged branch during the merge?
This case is necessary for the prepare-commit-msg hook.
Of course, you can parse .git/MERGE_MSG, but this is somehow not right or something)) If the default message is changed by someone, the script will not work correctly.
Actually a question: how on the basis of .git/MERGE_HEAD to receive a name of a branch to which this business belongs? Basically the branch I'm trying to merge?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question