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 6878481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:43:45+00:00 2026-05-27T04:43:45+00:00

We currently deploy to a dev server via Git with a post-receive hook. It

  • 0

We currently deploy to a dev server via Git with a post-receive hook. It is a dev server rather than a staging server so we would like to be able to deploy/view multiple branches (rather than just a “dev” branch or somethng similar).

When a new branch or commit is pushed the post-receive hook successfully performs a checkout on the remote repo to whatever branch is pushed.

Our typical cycle might be:

View new branch1 on dev server – git push devserver branch1

View new branch2 on dev server – git push devserver branch2

View old branch1 on dev server again – git push devserver branch1

However when we would like to checkout to an branch older branch than the current active one we cannot do git push devserver branch1 because the remote repo responds with “Everything up-to-date” since branch1 has already been pushed a while ago. Obviously the post-receive hook is not run so is there another way to action the remote checkout?

I know I can SSH into the dev server and checkout to the branch1 that way but I would like to perform the action from my local repo if possible. I have tried the pre-receive and update hooks but neither of those seem to run in this circumstances.

Any help much appreciated!

  • 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-27T04:43:46+00:00Added an answer on May 27, 2026 at 4:43 am

    Since it is just a (dev) server, why don’t you delete the branch and recreate it?

    git push devserver :branch1
    git push devserver branch1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I am trying to deploy my coldfusion application from my test server to
I would like to use Capistrano to deploy our web application but we don't
We currently deploy web applications by creating a database and running SQL scripts through
I'm currently getting the AccessControlException below when I deploy to app engine (I don't
I am currently deploying a Rails application using Capistrano. Cap deploy:update_code usually works just
Currently we have a hybrid ASP/PHP setup connecting to a SQL Server 2005 database.
I want to be able to build a war file and deploy it in
I want to call a function when click a cell in Extjs calendar http://ext.ensible.com/deploy/dev/examples/calendar/remote.html
I'm currently trying to deploy an Ruby on Rails 3.0.9 app on a production
I am working on a legacy Java Enterprise server project, and currently I am

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.