我最近从svn转换而来。 我的服务器是Windows下(不要怪我,这是不是我的选择:}git windows post pull
我创建了一个回购有两个分支“主”和“稳定”
在我的服务器我想要的。 。从稳定分支获得文件
我做:
git clone git://url/.git src
cd src
git checkout --track -b stable origin/stable
以前我有一个蝙蝠脚本
cd my_repo_dir
svn update
echo APPLICATION_STAGE = 'production' > conf\__init__.py
net stop apache2.2
net start apache2.2
和它的工作,现在用git
cd my_repo_dir
git pull
echo APPLICATION_STAGE = 'production' > conf\__init__.py
net stop apache2.2
net start apache2.2
没有什么混帐拉后执行,无论是成功,还是先进的日期。 它只是退出提示没有任何警告。
我想过挂钩。 我已经创建:
.git/hooks/post-receive
.git/hooks/post-update
两个文件具有相同的内容:
echo APPLICATION_STAGE = 'production' > conf\__init__.py
net stop apache2.2
net start apache2.2
和不,它不执行要么... 也许我缺少解释报关行(#/ bin中!/sh on * nix) 但我不确定它是什么在windows上...