How can I make use of this git repository folder?

Bruno Antunes

I am rescuing a disk that has a Gogs installation. There's a folder with all the git repos stores, they individually look like this:

drwxr-xr-x. 2 sardaukar 4.0K Jul 29 21:51 branches/
-rw-r--r--. 1 sardaukar   66 Jul 29 21:51 config
-rw-r--r--. 1 sardaukar   73 Jul 29 21:51 description
-rw-r--r--. 1 sardaukar   23 Jul 29 21:51 HEAD
drwxr-xr-x. 2 sardaukar 4.0K Jul 29 21:51 hooks/
drwxr-xr-x. 2 sardaukar 4.0K Jul 29 21:51 info/
drwxr-xr-x. 4 sardaukar 4.0K Jul 29 21:51 objects/
-rw-r--r--. 1 sardaukar   98 Jul 29 21:51 packed-refs
drwxr-xr-x. 4 sardaukar 4.0K Jul 29 21:51 refs/

Is there a way I can salvage this and clone these repos again? I have around 20 of them. Not looking to go back to Gogs, just want to be able to clone these repos again...

Thanks for any help!

msrd0

What you have rescued is a so-called bare repository which is the content of the hidden .git folder in your clone. Just save this directory on a computer with openssh running, say you save it to ~/repo with ~ being the home of the user user, you can clone with:

git clone user@<your-computer>:~/repo

your-computer is the computer with the ssh server running, if you clone on the same computer write localhost here.

EDIT (Thanks to Don Branson): If you are cloning your local machine, you can also write:

git clone /path/to/repo

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I make use of this git repository folder?

From Dev

How can I push a Git repository to a folder over SSH?

From Dev

How can I make individual git folders inside a git repository

From Dev

How can I make individual git folders inside a git repository

From Dev

How can I make git list only the tracked directories in a folder?

From Dev

How can I make git commit files in a symlinked folder

From Dev

how can I use git to track folder structure?

From Dev

How can I make git difftool to use gvim (gvimdiff)?

From Dev

How can I make git difftool to use gvim (gvimdiff)?

From Dev

How can I corrupt a Git repository?

From Dev

How can I tell the depth of a git repository?

From Dev

How can I add another repository in git?

From Dev

How can I uniquely identify a git repository

From Dev

How can I clear remote repository in git?

From Dev

How can I clone only a subfolder of a Git repository and make all the files in the subfolder end up in the root?

From Dev

How can I make docker-compose build an image from a remote git repository?

From Dev

How do I make a folder in my GitHub repository?

From Dev

How do I make a git hook for modifying then mirroring a git repository?

From Dev

How can I convert a Git repository with branches to a workable Mercurial repository?

From Dev

How can I convert a Git repository with branches to a workable Mercurial repository?

From Dev

Can I make a "deep copy" of a git repository with submodules?

From Dev

How I can make a button for browse a folder?

From Dev

How can I use git-svn to work with disparate parts of an svn repository?

From Dev

How can I push project in specific folder in my GitHub repository?

From Dev

How can I push project in specific folder in my GitHub repository?

From Dev

How can I upgrade a git 1 repository to a git 2 one?

From Dev

Can I use git-svn to create a Git repository from a single directory in a Subversion repository?

From Dev

How can i make BitBucket git clone on my local machine starting from inside directory not from repository directory

From Dev

How to create an independent git repository in a folder within a different git repository?

Related Related

  1. 1

    How can I make use of this git repository folder?

  2. 2

    How can I push a Git repository to a folder over SSH?

  3. 3

    How can I make individual git folders inside a git repository

  4. 4

    How can I make individual git folders inside a git repository

  5. 5

    How can I make git list only the tracked directories in a folder?

  6. 6

    How can I make git commit files in a symlinked folder

  7. 7

    how can I use git to track folder structure?

  8. 8

    How can I make git difftool to use gvim (gvimdiff)?

  9. 9

    How can I make git difftool to use gvim (gvimdiff)?

  10. 10

    How can I corrupt a Git repository?

  11. 11

    How can I tell the depth of a git repository?

  12. 12

    How can I add another repository in git?

  13. 13

    How can I uniquely identify a git repository

  14. 14

    How can I clear remote repository in git?

  15. 15

    How can I clone only a subfolder of a Git repository and make all the files in the subfolder end up in the root?

  16. 16

    How can I make docker-compose build an image from a remote git repository?

  17. 17

    How do I make a folder in my GitHub repository?

  18. 18

    How do I make a git hook for modifying then mirroring a git repository?

  19. 19

    How can I convert a Git repository with branches to a workable Mercurial repository?

  20. 20

    How can I convert a Git repository with branches to a workable Mercurial repository?

  21. 21

    Can I make a "deep copy" of a git repository with submodules?

  22. 22

    How I can make a button for browse a folder?

  23. 23

    How can I use git-svn to work with disparate parts of an svn repository?

  24. 24

    How can I push project in specific folder in my GitHub repository?

  25. 25

    How can I push project in specific folder in my GitHub repository?

  26. 26

    How can I upgrade a git 1 repository to a git 2 one?

  27. 27

    Can I use git-svn to create a Git repository from a single directory in a Subversion repository?

  28. 28

    How can i make BitBucket git clone on my local machine starting from inside directory not from repository directory

  29. 29

    How to create an independent git repository in a folder within a different git repository?

HotTag

Archive