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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:23:19+00:00 2026-05-13T08:23:19+00:00

I have a project hosted on GitHub and I would like to work locally

  • 0

I have a project hosted on GitHub and I would like to work locally on it. I have multiple Computers that need to access it and I would like to share code between them. However, I do not want all of these commits to go on GitHub, so a simple “clone and then just push/pull” approach does not suit.

Essentially, I want this:

[GitHub] --> [A Local Network Share] --> [PC1]
                                     --> [PC2]

So PC1 and PC2 should be able to push/pull to the local network share and thus share code between each other, and every once in a while I want to push those changes to my GitHub repository.

I’m a bit lost here – do I just create a branch? Or do I git clone from GitHub to my share and then git clone from my share to PC1 and PC2, which would result them only having 1 remote (the share) and the share only having 1 remote (GitHub)?

Edit: It’s not for security – I don’t mind when all the immediate commits go to GitHub, and I also don’t want to prevent PC2 from accessing GitHub. It’s more that I don’t want to setup the whole SSL stuff and because I am someone who commits very very often (sometimes every few minutes – I use git commit as an extended undo function), and I want the code on GitHub always to be compilable.

Edit 2: The solutions here did not work for me yet 🙁 So I do

git clone --bare git@github.com:foo/bar

on my server. This creates a clone. On my PCs, I git clone this repository – that step works fine, my PCs have a .git repository and my server is set up as a remote.

However, on the server, nothing is set up properly – there are no remotes added and i can’t push from there. Adding a remote is easy using git add, but then how do I push? git status says it requires a work dir (which we don’t have with –bare), and git push says “Everything up to date” even though it isn’t (I made a change on PC1 and git pushed to the Server)

Creating the repository on the server without –bare means that it has it’s own work dir, so when I git push from the PCs, the server does not pick that up (I’m guessing I somehow need git pull from the PCs, but I want to avoid that).

Am I missing a step here?

  • 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-13T08:23:19+00:00Added an answer on May 13, 2026 at 8:23 am

    The second solution should be enough.

    • Creating a fork would mean your intermediate stage would still be GitHub (a fork is a git clone on GitHub)
    • creating a branch does not solve anything in term of sharing code

    If you make a git clone --bare myGitHubRepo.git on your share, and then clone that sharedRepo on PC1 and PC2, you have set up for each of those PC repo a natural destination for them to push/pull.

    Edit by mstum: This approach works and is correct, but is missing a step. The bare clone on the server does not have any remotes setup. This needs to be done either with

    git remote add origin git@github.com:user/Project.git
    

    or every push from the Server to gitHub needs to be

    git push git@github.com:user/Project.git
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two different .Net projects, hosted on github. I would like to create
Is it possible to have a project hosted on GitHub and Google Code? I've
I have a rails + postgresql project hosted on github. I usually work on
I'm working on a project that is hosted on Bitbucket. I would also like
I have a project that is hosted on github. Now what I want is
I have a private project, and i want it hosted on google code. this
I work mostly with Git and have a lot of code on github. I
I have a project hosted on GitHub and I use Git for source versioning.
I have a project hosted on github. There is a main branch (main-branch) for
I am working on a github hosted project. For testing reasons, I have to

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.