I currently have a following Git workflow local normal git repo -> remote bare git repo -> staging normal git repo. My bare repository has a post-update hook, which
looks like this:
cd /path/to/my/staging/repo
unset GIT_DIR
git pull bare master
Everything seem to work fine, except for one thing: every time I change a file, and execute “git push origin master”, the modified bits a treated as conflicts (on Heroku the new changes just overrides the old ones, not sure exactly what happens but it seems so). How to solve this?
Thanks!
Ok so it seems that I have found a solution, adding these two lines:
instead of
git pull bare master, gave the needed result.