Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Remote: Show a Custom Message, at Every Clone/Fetch?

Tags:

git

Is it possible to configure a git remote repo in such a way that everytime someone fetches it or pushes something, a custom message is displayed?

My intention is to give information about the branch structure. So in a way a light version of a git request-pull.

#git fetch
Welcome to projectx... commit your experimental changes @beta,
the more or less stable features @dev.
The stable and the testing branch will be maintained by "Mastermind"

Thats what I imagine. Is this possible? I've got full rights to the remote repo.

like image 967
Akzidenzgrotesk Avatar asked Feb 26 '16 19:02

Akzidenzgrotesk


1 Answers

The closest I can find is the uploadpack.packObjectsHook config option. There you can specify a script which should print the message to the standard error and call git-upload-pack with same arguments.

I did not try if it works.

like image 80
max630 Avatar answered Sep 29 '22 14:09

max630