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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:35:36+00:00 2026-06-11T03:35:36+00:00

WARNING: I’M NEW TO GIT!! I installed git on my local machine. I also

  • 0

WARNING: I’M NEW TO GIT!!

I installed git on my local machine. I also installed it on a server on our network. On the server, I created C:\git to house my code and shared that directory. So, I did:

$cd C:\git
$git init --bare

I set up a new remote on my local machine to point to the shared directory of the “git server”

$git remote add shared "//shared/path/to/git/folder"
$cd C:\path\to\my\source\code
$git init
$git add -A
$git commit -m "initial push"
$git push shared master
$git checkout -b test
$git push shared test

So, now that I’ve done all that, when I go back to the server, I am expecting to see the server copies of my source code there, but I don’t see it. Am I missing the entire point of git or am I doing something wrong?

  • 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-11T03:35:38+00:00Added an answer on June 11, 2026 at 3:35 am

    Git stores your source as “binary large objects” (BLOBs, or just “objects” for short). A bare repository, like the one on your server, contains ONLY those BLOBs, not a “working tree”, which is what your cloned repository has, which is why you can’t see your files as normal on the server. They’re there, uniquely named based on their content, in the objects directory. Try this experiment:

    git init
    
    echo "hello" > hello.txt
    
    git add hello.txt
    
    dir .git/objects
    

    You’ll see a subdirectory called 2a. Look inside that directory:

    dir .git/objects/2a
    

    You’ll see a file called 93d00994fbd8c484f38b0423b7c42e87a55d48. The directory name (2a) along with the filename make up the SHA1 hash of the contents of the file hello.txt (the string “hello”, that is).

    Now if you type:

    git cat-file -p 2a93d00994fbd8c484f38b0423b7c42e87a55d48
    

    You’ll see the contents of hello.txt! That’s the object that’ll be stored in the bare repository, which is why you don’t just see the file hello.txt sitting there; it’s been given a special name, compressed, and put in the objects directory.

    As your repository grows, things get a little more complicated, because as the size of your content, and the number of your commits grow, Git starts packing similar files together; all of the information is still there, but it’s further compressed for efficiency.

    Another way you can reassure yourself that your files are indeed being stored on your server, you can create another clone (not a bare one!) and you’ll have a working tree with all of your files in it.

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

Sidebar

Related Questions

WARNING The code I provide in my question may crash matlab AND your machine!!!
Warning: This is inherited legacy code that was initially put together in the early
WARNING: This is an exploit. Do not execute this code. //shellcode.c char shellcode[] =
Warning, this is a sheer-laziness query! As my project develops, so also do the
Warning: very outdated question with an awful idea. Storing code, whether it be PHP,
Warning I'm brand new to rails! While reading through a tutorial it has asked
WARNING: THIS CODE SUCKS, SEE ANTHONY'S COMMENTS Which is faster? 1. public bool IsValueType<T>(T
Warning - I am very new to NHibernate. I know this question seems simple
Warning - new to Silverlight / RIA Services / etc. I have a business
Warning: I am very new to Access coding. I am used to .NET 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.