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
I started in the root directory where I ran
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
root.git but I cannot see any evidence that anything was cloned I just see a set of files and directories when I
I don’t know how to verify it was actually cloned, and if it was why can’t I see the original files?
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
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
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…