Git Init - Error submitting message - fatal: not enough memory? mmap failed: no such device

I get this when initializing an open repository, although about 1 GB is available on my remote computer. I also looked at git to add the error: "fatal: malloc, out of memory" , but that really doesn't help.

I do not understand why this error was created, it seems rather strange. Why is this happening?

+4
source share
2 answers

Do you have a directory / file called "config" in your bare repo?

See http://www.bitchx.com/log/git-f/git-f-20-Mar-2010/git-f-20-Mar-2010-03.php ( mirror )

EDIT: if so, you should almost certainly not use git init --bare - the bare one is for empty "server" repositories that you intend to click on, and not for initializing a new repo from the working tree.

+6
source

Firstly, this is a very strange error message.

Secondly, you need to do the following:

  • In the source directory:

    git init

  • Then, somewhere else:

    git clone --bare <your source directory > <name you want for your repository >. git

eg.

 git clone --bare my-source my-source.git 

You can then copy the resulting empty repository to a remote location and clone it.

For completeness of another way to do this:

  • Create an empty empty repository:

    mkdir my-source.git

    cd my-source.git

    git init --bare

  • Go to your source directory and make it git repo (non-bare):

    cd / path / to / my-source

    git init

  • Add a bare repo as a remote source:

    git remote incremental source / path / to / my -source.git

  • And press the contents of your repo on the remote control:

    git push --all

If running git init (without --bare ) inside the source directory gives this error, you have another problem.

+8
source

Source: https://habr.com/ru/post/1348181/


All Articles