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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:20:51+00:00 2026-05-16T15:20:51+00:00

I have a personal laptop and a development box and want a setup with

  • 0

I have a personal laptop and a development box and want a setup with following things in mind:

  1. I want to have my code working on both machines. (That means I cannot have --bare repo.)
  2. I want to develop on my laptop.
  3. I want to push to dev box from time to time.
  4. This is mainly for web development.

I tried initializing a Git repo with code on dev box and cloned in on my laptop. I could not push changes to dev box though. It gives me the error that I am pushing to a non-bare repo.

Then I tried --bare repo and it worked, but then I cannot run the code sitting on dev box. (Or can I?)

Any ideas on how to achieve this kind of setup?

  • 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-16T15:20:52+00:00Added an answer on May 16, 2026 at 3:20 pm

    One way to solve this is to create a third repo (that you can think of as the “main” repository) that is --bare. To share changes, you can push to the bare repository from one machine and pull from the other.

    If you put this bare repo on the web box, then you can set up a post-commit hook to automatically extract the files from the main repo to the (non-bare) repo that’s used by the web server.

    I usually don’t set up such a post-commit hook, but my workflow is generally:

    • make change locally (laptop in your case)
    • ensure it works in test environment
    • commit
    • push to bare repo
    • on web server, pull from bare repo into working dir
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have VisualSVN Server installed on my personal laptop, and now that I'm leaving
I have a personal website that I want to see when the last post
I have a personal project I'm working on that requires Microsoft SAPI5 -- text
I have a personal project that's been online for sometime now. I've been keeping
I have a database for a web application that is home to some personal
I'm begining the development of a personal Web Application project. I'd like to have
I need advice if this setup is ok. I have a personal dev server
I am studying Forth for a personal project I have on my mind. It
I'm designing my personal website at the moment and want to have images inside
I will be working on an iPhone app with another developer. We both have

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.