Phoste
Phoste

Reputation: 1209

Can I restore my source files with only the .git folder?

I had a problem with my cloud file server and I don't have the source of my project anymore... Is it possible to restore the full project with only the .git folder ?

If it's possible, how can I do it ?

Upvotes: 3

Views: 413

Answers (1)

Tim Biegeleisen
Tim Biegeleisen

Reputation: 521457

Open the Git bash and navigate to the folder containing the .git folder/file. If the prompt shows some branch, then it's looking good for you. You should then be able to just checkout a branch, e.g.

git checkout master

The .git folder should store all the state of that particular local repository.

Upvotes: 3

Related Questions