Git post-rewrite fails

I have an executable file .git/hooks/post-rewrite, which for testing purposes has the following lines:

#!/bin/bash

echo "Notice: post-rewrite hook is running"

I understand that the hook post-rewriteis executed after operations that overwrite the commit history, for example rebaseand git commit --amend.

Indeed, at startup, a git commit --ammendmessage will be displayed after the message stdout. However, when I do git rebase masterfrom a branch that is behind master, or git pull --rebase, nothing is printed on stdout.

Did I miss something?

+4
source share
1 answer

when I do git rebase masterfor a branch that is behind ; orgit pull --rebase

; ; . .

+3

Source: https://habr.com/ru/post/1652483/


All Articles