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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:56:02+00:00 2026-05-20T10:56:02+00:00

I’ve used to using Github as a backup or a central repository and doing

  • 0

I’ve used to using Github as a backup or a central repository and doing both development and testing locally.

Now I have a remote test machine and want to be able to push local commits to the remote such that the remotes working directory updates, allowing me to run tests on the contents.

1) Most of the instructions I have found for setting up remotes is to use a –bare init. As far as I understand, this means the remote lacks a working directory and accepts pushes. Setting up a remote without –bare fires an error when I try and push. How can I accomplish the above workflow?

2) Is this workflow even a good idea? Should I instead have a test repo located on the remote machine in addition to the bare repo. I make my pushes from development to the bare repo and then, when I am ready to test, I pull from the bare repo into the test repo.

In case it matters, I asking in relation to a Rails project but I haven’t tagged this question as such because I can’t see why it would.

  • 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-20T10:56:02+00:00Added an answer on May 20, 2026 at 10:56 am

    I’d suggest going with a bare repository for pushing and a second repository that will pull from it where the tests will run. It will be easier to understand and you don’t have to be careful when you decide to scratch the test environment and re-create it. If they are on the same server, the test repo can have ‘alternate’ set up for the central one, so the objects won’t be stored twice (created using git clone --shared).

    Even with this setup, you can easily have the tests run automatically. Just install a post-receive or post-update hook in the central repository, that will run the test. There is even a ready-made implementation in contrib/continuous in git sources that you can tweak to your needs.

    It’s not that you couldn’t set up a push repository with working directory. Git will not allow you to push to the checked-out branch (because it does not know how to update it during push and would not know how to do it later), but that can be worked around by using ‘detached HEAD’. It will however be quite confusing and you risk accidentally removing important data when you decide to rebuild your test environment.

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

Sidebar

Related Questions

No related questions found

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.