I command Git to clone repository but it only clones the ". git" and ". gitignore" folders

Asked

Viewed 60 times

0

I do the command to clone the code that’s in Github but Git only clones the ". git" and ". gitignore folder".

Here is my repository:

inserir a descrição da imagem aqui

The project:

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

(If I’m putting up too many pictures, excuse me... I’m new here, I’m learning rsrs...)

And then I started Git in my Eclipse project folder, as shown in the image below:

inserir a descrição da imagem aqui

And you see I’ve already done the cloning:

inserir a descrição da imagem aqui

But note that he does not clone the rest of the data, but only the two folders I mentioned... What I may have done wrong?

inserir a descrição da imagem aqui

I appreciate all the help you can give...

  • 1

    Have you tried the option git clone -b master https://github.com/VictorHSM24/aula1-github

  • Utilize git branch --all to list all branches of the project and git switch <branch-name> to change between them.

1 answer

2

The clone was done correctly. So much so that in his first print, shows only the .gitignore, but in the branch Main. As we can see in your others prints, you also created the branch master and that’s where you went up your source code.

On your local machine, you need to do the checkout of that branch to be able to work on it.

git checkout -b master 

Then the right one will appear. But still, you need to solve the problem, take a look at this video here that I recorded, explaining this question of branch’s.

https://youtu.be/e6doXVQxhSU

Browser other questions tagged

You are not signed in. Login or sign up in order to post.