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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:07:27+00:00 2026-05-12T10:07:27+00:00

I understand the basic and how the workflow works and what not. However, let’s

  • 0

I understand the basic and how the workflow works and what not. However, let’s say I have a local repository on my linux workstation. Now, I also have a production box located on a VPS in a remote DC. If I wanted to push out new code to the production box, what’s the best way to do so? I don’t want to have a Git repo on the box, it should just have my web code (php/mysql).

How does one push out the new changes to the production box w/o sending over ALL the files?

  • 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-12T10:07:28+00:00Added an answer on May 12, 2026 at 10:07 am

    One way to manage web content is to create a “bare” repository on the production box. This is a repository that doesn’t have a working copy. When you want to deploy new code, you would push to this repository to update it. Then, log in to the production box and pull from the bare repository into your actual deployment directory (which is also a Git repository).

    Note that neither of these repositories on the production box need to be considered the “master” repository; you can keep your source code elsewhere and just push to production as needed.

    The reason you need two repositories is that Git does not support pushing directly into a repository with a working copy. Git has historically allowed you to do this (often with unintended consequences) but newer versions strongly encourage you to avoid pushing in this way.

    I use the above technique to manage some web sites and it works really well. One benefit is that if I really need to, I can patch something on the production machine, commit it right there, then later on pull that change into my development repository. Changes made in this way are much less likely to get accidentally lost.

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

Sidebar

Related Questions

i start to study asp.Net now, i understand basic html (css not) i need
For the life of my I can't understand how the basic paperclip example works.
I encountered some strange behavior which hints that I do not understand some basic
I understand the basic syntax of Objective-C, have installed Cygwin, and want to experiment.
Just want a basic understand of what parts a email message may have. I
I have a question because I'm really bad at SQL. I understand basic functions
I'm trying to understand the basic mechanism at which apache works internally (for academic
I understand the basic principles of inheritance in OOP, but I have a specific
I have been reading about event managers and I understand the basic mechanics, or
I am trying to better understand basic concepts in OOP. What are static and

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.