I recently converted from svn. My server is under Windows (do not blame me, it was not my choice:}
I created a repo with two branches "master" and "stable".
On my server, I want to get files from a stable branch.
I did:
git clone git://url/.git src cd src git checkout --track -b stable origin/stable
I used to have 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 done after git pull, whether it is successful or relevant. It simply exits the command line without warning.
I was thinking about hooks. I 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 no, it doesn't execute either ... Maybe I miss the interpreted declaration line (#! / Bin / sh on * nix) but I'm not sure if it's on the windows ...
source share