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

  • git: check when the last fetch was run
  • Git server side hook not firing - how to check
  • How to check if Git is installed from .bashrc
  • Linux - run multiple parallel commands, print sequential output
  • How to cope with spaces in file names when iterating results from git diff --name-only
  • Script bash that restart PlayFramework 2 instance after a push to git?
  • 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

  • Configure Git With Existing Keys
  • Git help command does not open in configured browser
  • check: git rebase done or not?
  • How to make git gui not show untracked files
  • GIT global config for ignore end-of-line white spaces
  • multiple instances of android app - git project management best approach
  • 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.