working hard on configuration of my git repository, but stil no success.
Goal: as soon i make a push on my lokal repo, to the dev branch, it will merged with master brench.
post-update (hook)
#!/bin/bash # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". LOGFILE=/www/htdocs/w00dac5d/_production/.git_push_log.tmp &> $LOGFILE echo 'push-start' echo `basename $PWD` #cd ../ #echo `basename $PWD` git status git checkout master echo 'push-checkout' git merge dev exec git-update-server-info
getting errors like
"its not a git repo" but i check teh folder an it is the right one.
GIT_DIR
environment variable.git status
: the current directory isn't the only thing that matter.basename $PWD
he is in _production, this is the git repo...GIT_DIR
to that.git
directory full path (andGIT_WORK_TREE
to the parent directory), to be extra sure. Test it and see of the errors persists.