How can I verify git clone is working correctly?

I’m following the documentation provided here by git to setup a bare git repository in a folder called root.

I started in the root directory where I ran

  • How to list all files in the Git index without newline at end of file
  • Bash git alias tab completion error
  • Speed up bash script that uses several find commands
  • Can git automatically split up a commit into single hunks?
  • Is it possible to accept user input as part of a remote git post-receive hook?
  • How to auto-configure git merge tool based on what is available on current machine?
  • git init
    git -A *
    git commit -m "test"
    

    I then ran git status and all appears good.

    Next I ran the line from the documentation at a directory one level above the repo I created above.

    git clone --bare root root.git
    

    This created root.git but I cannot see any evidence that anything was cloned I just see a set of files and directories when I cd root.git.

    I don’t know how to verify it was actually cloned, and if it was why can’t I see the original files?

    enter image description here

  • Undefined symbol “locale_charset”
  • Not how but why a committed file cannot be ignored easily (Practical Purpose of “Assume Unchanged”)?
  • How to git pull for multiple repos on windows?
  • Update my git branch with commits in another branch
  • Creating proper build or deployment chain with Microservices, Docker, Jenkins and GIT
  • Gitignore exclude subfolders (with **/ pattern) except specific one
  • 2 Solutions collect form web for “How can I verify git clone is working correctly?”

    When you do --bare — you are telling git to clone just the git portion –

    This is the option you use when you want to have a remote repository that does not include a workspace.

    If you want to verify that it actually cloned your changes, you’ll want to clone it again in a different directory – without the --bare flag

    I would recommend using the full path to do this:

    cd /path/to/some/workspace
    git clone /path/to/your/root.git successful-git-clone #that last bit is optional
    

    This will put the workspace contents of root.git into a folder named successful-git-clone/ – without that last bit, it will default to root/

    Even if you are in a bare repository, some git commands works and you could do a git branch to see if you have all your branches or git log to look at your commits…

    Git Baby is a git and github fan, let's start git clone.