How to recover folder .git?

In the local directory with the project folder .git, and it so happened that it did not. If you re-do a git init then it will not be visible branches, only master. Tried to do git clone, the effect is the same. How to recover folder .git?
June 26th 19 at 14:01
3 answers
June 26th 19 at 14:03
Solution
git init
git remote add origin <url of your repository>
git fetch</url>


Local branches may not be, but branches origin/* in place, git checkout <branchname>
June 26th 19 at 14:05

Tried to do git clone, the effect is the same.

Apparently, bad tried. Git clone just the same for this is. Try again.
June 26th 19 at 14:07
Download the repository and copy the folder directly in the file system

Find more questions by tags Git