Hi, I was originally informed to use `git push <URL>` <URL> being the location of the repository, not github in this case, that doesn't work as I get an error `repository not found` ?

Running the command `git branch -r -v` doesn't display anything which I assume it's suppose to display ?

Thank You

Christopher


On 7/25/2018 2:34 PM, Konstantin Khomoutov wrote:
On Tue, Jul 24, 2018 at 07:00:05PM -0700, Christopher wrote:

Hi I've cloned a repository but I'm not seeing the cloned files in my local
repository ?
Hi!

I can think of two possibilities.


An unlikely one is that for some reason you've cloned the repository
using the "--bare" and/or "--mirror" command-line option. In this case
the resulting repository ended up being "bare"; bare repositories do not
have an area containing the checked out files — instead, they contain
the Git object database right at their top level directory.

Since the object database does not keep the files committed to the
repository "as is", this could explain why you see no files in the
clone.


A supposedly more likely case is a bit harder to explain.
When you call the `git clone` command without supplying it the
"--branch" command-line option, the local Git asks the remote repository
about the branch it considers to be "current". Having figured that out,
that branch is also made current (and checked out) in the local
repository.

In most repositories used for centralized access (such as those repos
served by Github, Bitbucket etc) the current branch is "master" but 1)
it's possible to change that, and 2) when you clone a regular non-bare
repository the current branch is the one which is currently checked out
there.

So, if for some reason the current branch of the repository you've
cloned contained no files in its tip commit, that state was faithfully
reproduced in the local repository created by the `git clone` command.

To check whether this is indeed the case, you can run

   git branch -r -v

in the resulting repository.
Look for the branch named "origin/HEAD" in the left column as this is
what defines "the current branch" in the source repository.

The material in [1] should have you covered on how Git manages branches
it grabs from a remote repository when cloning it and/or fetching from
it.

1. https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches


--
You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to