Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5994475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:49:23+00:00 2026-05-22T23:49:23+00:00

I have recently converted from svn. My server is under Windows (don’t blame me,

  • 0

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…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:49:24+00:00Added an answer on May 22, 2026 at 11:49 pm

    Few points:

    • Make sure you have git.exe on path. Do a where git and you must get something like

      C:\Program Files (x86)\Git\bin\git.exe
      

      If git.cmd is being used ( from C:\Program Files (x86)\Git\cmd\git.cmd ), you have to do call git pull for it to continue execution. I would say add git.exe to path and start using it.

    • Even on Windows, you must have the shebang – #!/bin/sh for the hooks to properly run.

    • If you want a hook to run on pull, you probably want to use the post-merge hook. post-receive and post-update run on remote repos when you push to them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an existing (old) codeline that we have recently converted from VC6 to
We have quite Large Web Based System, which is recently converted from Website to
I recently converted a subversion repo, which had been converted from cvs before that
Hi I have datatype for a field recently converted to xml from varchar(MAX) in
Ok, so we recently converted from SVN to Mercurial. We are using TortoiseHG normally.
I have a report, which was recently converted from SSRS2005 to SSRS2208. The report
I have bean that i recently converted over from being a managed-bean to being
I have recently converted 10 JavaScript files into one file, which I then run
My site contains profile pages for companies. I have recently converted the open graph
I have recently migrated my code from Rails 2.3.4 to rails 3 and started

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.