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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:20:33+00:00 2026-06-03T18:20:33+00:00

I have a production server with git-1.7.3.4_centos5.2 described here , and I have a

  • 0

I have a production server with git-1.7.3.4_centos5.2 described here, and I have a local machine with git 1.7.7.1. What I need is a copy on local server where I can develop the site and upload it to the production server. There is another guy who can modify the content, so I need to pull the changes too. How can I solve that with git? (The most actual code is on my local machine now.)

I made some tests: I cloned an empty repo, and after that I modified the repo on the server. I could not download it with remote/download (git gui), but with checkout I had success. The push did not work also. How can I make them operational?

  • 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-06-03T18:20:37+00:00Added an answer on June 3, 2026 at 6:20 pm

    You should define two remotes:

    What I need is a copy on local server where I can develop the site and upload it to the production server

    That is a simple

    git clone http://www.your_prod_server.com/git/your_bare_repo.git
    

    That will clone the repo and define a remote named “origin”. You will be able to push to it because it is a bare repo.
    See “all about “bare” repos — what, why, and how to fix a non-bare push“.
    See also “GIT: after push, remote repo shows files as deleted” for the danger of pushing to a non-bare repo:

    When you push to a remote repo in Git, it does not update the working copy of that remote repo.
    This means that the working copy will be out of sync with the last version that you pushed.


    There is another guy who can modify the content, so I need to pull the changes too.

    You need to add a remote pointing to the “other guy’s repo address”

    git remote add otherguy http://otherguy_server/other_guy_repo
    

    Even if that colleague’s repo isn’t bare, you will be able to fetch from it, getting back his changes in your repo, and merging them in your local branch.

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

Sidebar

Related Questions

On my production server, I just have master always checked out. I do git
I have a git branch on my production server which is centos. I am
I have a git bare repo on production server: /home/username/railsapp.git Now I would like
Our team has recently migrated to git. We have production web application server with
I have a production server from some hosting company, so I can't put a
We currently have in production SQL Server 2005 and we use it's full text
We have Windows Server 2008 as our Production server hosted in RackSpace environment. Following
I have 2 test and 1 production server. In my global.asax file - I
I have ELMAH setup on my production server and it has done a fantastic
We have problem with our Qt based production server for our business application. When

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.