-1

I'm creating a tutorial for my coworkers on 'how to Git', and I added a simple tutorial for add, commit, and push, and now I want them to verify what they did worked.

I thought I would say "Go to the remote folder, and verify the new files are there", but my remote looks like the inside of /.git/.

Did I setup my remote incorrectly?

I create it as follow: git init --bare .\tutorialName\Remote

I had hoped to have a structure equal to the local repository, but that does not appear to be the case.

Rasmus Bækgaard
  • 737
  • 2
  • 11
  • 27
  • 1
    Perhaps you should read the [documentation](https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git-init.html) for `git init --bare`. – Jonathon Reinhart Apr 22 '18 at 18:00
  • 4
    Possible duplicate of [What is the difference between "git init" and "git init --bare"?](https://stackoverflow.com/questions/7861184/what-is-the-difference-between-git-init-and-git-init-bare) – Jonathon Reinhart Apr 22 '18 at 18:01

2 Answers2

3

my remote looks like the inside of /.git/.

That's exactly what a bare repo is.

What you normally think of as a local "git repo" is really two things:

  1. A local copy of the repository (objects, refs, etc.) - this is kept in .git
  2. A working copy - a set of files equivalent to a snapshot of the tree at some point in history

A bare repo does not have #2.

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328
  • That should cover it. If I still wanted to verify a file was committed correctly, what would I ask them to do? – Rasmus Bækgaard Apr 22 '18 at 18:18
  • 1
    They could pull it into another local clone. There are a ton of Git tutorials out there - I suggest starting from one of those rather than reinventing the wheel. – Jonathon Reinhart Apr 22 '18 at 18:20
0

this is exactly what the bare remote does, it stores a copy of your local .git folder.

All your commits, branches etc. are stored in the /.git/ folder. That is what you push to the server.

Hope that helps you.