gitlab - git diff not working on a bare repo, post-receive hook -


i working on post-receive hook on bare repo. want file names changed , pushed in bare repo (only latest one). using command.

git diff --name-only head^

this gives me error when push bare repo.

remote: fatal: operation must run in work tree 

i got there no worktree in bare repo command fails how run?

i believe command looking git diff --name-only head^ head. compare "current" commit commit before it.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -