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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:41:07+00:00 2026-05-15T13:41:07+00:00

i tried to set up git server and deployment server on the same machine

  • 0

i tried to set up git server and deployment server on the same machine for my ror application. I pushed the project from local machine to the git server/deployment server using the following commands:

git remote add origin path_to_git_server
git push origin master

Then, on the git server, I found the ‘master’ file under ~/git/log.git/ref/heads, but nowhere can I find all the source codes. I need to point to the source folders in order it works on apache web server. What did I do wrong here? Thanks.

  • 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-15T13:41:09+00:00Added an answer on May 15, 2026 at 1:41 pm

    It is likely that you created a git init --bare repository – this will not work as it is only the git repository and not the working stage. I’m going to set this up as a three machine layout – but it can be run on two or even just one machine.

    Machine A (your development machine)

    Machine B (your remote repository)

    Machine C (your production environment)

    (But if you have production, development, and “remote” repository on one machine that’s fine too)

    When you’re ready to push to Machine B (Repo) you commit all your work, stage it just right, then perform a git push (after doing the remote add, etc) this updates the Bare remote repository with all the changes from your machine since the last push (Think of it as syncing the contents of your .git folder on Machine a with the remote repo)

    Since Git only cares about the changes of the contents of your files (and not actually about the files or folders themselves – trust me Git does not care about your files – just the content) it doesn’t store files one Machine B like you see on your Machine A “Working Stage” Git places those files in the working stage for you to use and develop against – but Git doesn’t care about them – again it cares only about the changes to the contents of the “files” since the last time you committed.

    To deploy your code you will need to go to Machine C and clone the repository on Machine B – this will sync the “.git” folder down to that machine and then build the subsequent files/folders based off all the content it’s tracked. Once you’ve cloned this repository you can get future updates via git pull

    That’s about the jist of it. If you have it all on once computer you could do something like:

    ~/projects/git_project (Your devel area)
    /home/repo/git_project.git ("Remote" repo)
    /opt/rails/git_project ("Production" machine)
    

    Having a remote repo is redundant on one machine since you can technically pull and push from

    ~/projects/git_project
    

    to

    /opt/rails/git_project
    

    But just keeping the example in line

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

Sidebar

Related Questions

I have tried following how-set-up-your-own-private-git-server-linux and private-remote-git-repositories-ubuntu-linode but I am still having problems. My
I'm using gitosis to host a git repository on my home server. I've set
I tried to set the usergent using Inet1.Execute , GET, Referer: yahoo.com & vbCrLf
I tried to set up my togglebutton properties layout using style.xml. Here's my code:
I need to set -Dfile.encoding=UTF8 globally on Windows machine. I tried to set JAVA_OPTS
I’m using a JPanel to add JComponents on and I tried to set the
I want to achieve this using html and css: I have tried to set
So this is how I set up my project: git init --bare Later I
I've been using for a while a small git repository that has been set-up
I've recently set up cygwin, git, and gitosis on my Windows Server 2003 box

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.