Extract code from backup

Hi, I have my backup.zip done with gogs and I would want to know how to get the sources from it without load it in gogs.

Thank you.

Mathias.

If you have backup without --exclude-repos flag, you can just unzip the archive, otherwise, repositories are not in the archive.

Where are they then ?

Are you sure it’s not the opposite ?

What is “opposite”?

Sorry, my bad, I read “with” against “without”.

Then, I unzip it and i didn’t found any sources files, is there another step to get the “.js” of the last commit ?

Repos managed by Gogs are stored in bare format, which does not have a working tree as we usually have on the client machine: https://www.saintsjd.com/2011/01/what-is-a-bare-git-repository/

Oh ok thank you, then how to extract code from this format?

Just do git clone path/to/directory, Git knows if it’s a local filesystem path or remote URL.

Omg so simple, thank you a lot. :ok_hand: :+1: