I have recently converted from svn. My server is under Windows (don't blame me, it wasn't my choice :}
I have created a repo with two branches "master" and "stable".
On my server I want to get files from stable branch.
I have done:
git clone git://url/.git src
cd src
git checkout --track -b stable origin/stable
Previously I had a .bat script
cd my_repo_dir
svn update
echo APPLICATION_STAGE = 'production' > conf\__init__.py
net stop apache2.2
net start apache2.2
and it worked, now with git
cd my_repo_dir
git pull
echo APPLICATION_STAGE = 'production' > conf\__init__.py
net stop apache2.2
net start apache2.2
nothing is executing after git pull, whether it is successful, or up-to-date. It just exits to prompt with no warning.
I thought about hooks. I have created:
.git/hooks/post-receive
.git/hooks/post-update
both files with the same contents:
echo APPLICATION_STAGE = 'production' > conf\__init__.py
net stop apache2.2
net start apache2.2
and nope, it is not executing either... Maybe I am missing interpreted declaration line (#!/bin/sh on *nix) but I am not sure what it is on windows...