I just wanted to run a git hook(post-merge) to verify what are all the changes happened in the recent pull.
this is my post-merge script
#/usr/bin/env bash
echo "======> following are changes made to local repo <======"
git fetch && git log ..origin/master --pretty=format:"%s - %ar by %an (%h)"
echo "=======> ****************** <========"
I have given necessary file permission chmod +x post-merge
command git fetch && git log ..origin/master --pretty=format:"%s - %ar by %an (%h)"
runs perfectly when i ran it manually.
But when i do a git pull origin master
it is showing only
echo "======> following are changes made to local repo <======"
echo "=======> ****************** <========"
Because git pull
performs both git fetch
and git merge
i tried with
#/usr/bin/env bash
echo "======> following are changes made to local repo <======"
git log ..origin/master --pretty=format:"%s - %ar by %an (%h)"
echo "=======> ****************** <========"
Where i am going wrong?
git version 1.9.1
Thanks