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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:27:38+00:00 2026-05-27T11:27:38+00:00

thanks for any help. I have a git repo on my local machine (mac

  • 0

thanks for any help.

I have a git repo on my local machine (mac osx lion) which I’m trying to push to my ec2 instance with Ubuntu.

On the ec2 server I’ve done:

cd /u/apps
mkdir stuff.git
cd stuff.git
git init --bare
git update-server-info

On my local machine I’ve got the folder ‘stuff’ which just has a text file.

cd stuff
git init
git add .
git commit -m "initial commit"
git remote add origin user@111.111.111.111:/u/apps/stuff.git
git push origin master

Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 477 bytes, done.
Total 4 (delta 0), reused 0 (delta 0)
To user@111.111.111.111:/u/apps/stuff.git
95d5ae5..4b5a30f  master -> master

everything appears to be fine but when I check the server the new text file called ‘hello.txt’ hasn’t been added. All I see is:

/u/apps/stuff.git$ ls
branches  config  description  HEAD  hooks  info  objects  refs

Any thoughts on what I may have overlooked?

Cheers

  • 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-27T11:27:39+00:00Added an answer on May 27, 2026 at 11:27 am

    Yes, you don’t see the files because you created a bare repo ( git init --bare) as it should be. Bare repos don’t have a working tree.

    If you are trying to get the file at a particular path, from the bare repository on thte server, you must setup a post-receive hook and have it checkout. The post receive hook will have something like:

    GIT_WORK_TREE=/path/where/to/checkout git checkout -f
    

    (the above can also be run manually from the repo on the server if you want.)

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

Sidebar

Related Questions

I am using c# .net. Thanks in advance for any help. I have searched
Thanks in advance for any help... I'm trying to (1) generate a begin time
Hello all and thanks for any help in advance. I have a ruby on
I have been trying to deploy a simple rails3 app from my mac(os lion)to
I'm trying to switch local branches in GIT but some auto-generated, ignored and uncommitted
I have a fresh git-svn repo (11.13 GB) that has over a 100,000 objects
I have an old laptop which runs OSX 10.4 Tiger where I'd like to
I have a local git repository. Recently I have added a remote repository from
I have a branch which I've merged into master. On the branch, git log
Currently I am trying to clone this git repo: https://github.com/twilio/OpenVBX into my main repo,

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.