# How to make public repository GIT_DIR=my-git.git git-init Command not found.

6 messages from 2008-11-18 to 2008-11-19. Participants: Gary Yang, Shawn O. Pearce, Alex Riesen.
Thread: https://gitlist.dev/t/16385

## Gary Yang, 2008-11-18 23:16

Subject: How to make public repository GIT_DIR=my-git.git git-init Command not found.
Message-ID: <138223.4849.qm@web37905.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/138223.4849.qm%40web37905.mail.mud.yahoo.com

```
Hi,

I want to make a public repository. I followed the instructions in gitcore-tutorial. I typed "GIT_DIR=my-git.git git init" per instruction. But, I got command not found. I do not think this is the correct command. How should I do? I use C-Shell.

http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html

%mkdir my-git.git
%GIT_DIR=my-git.git git init

GIT_DIR=my-git.git: Command not found.


Thank you,


Gary





      

```

## Shawn O. Pearce, 2008-11-18 23:19

Subject: Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
Message-ID: <20081118231925.GW2932@spearce.org>
URL: https://gitlist.dev/e/20081118231925.GW2932%40spearce.org
In-Reply-To: <138223.4849.qm@web37905.mail.mud.yahoo.com>

```
Gary Yang <garyyang6@yahoo.com> wrote:
> Hi,
> 
> I want to make a public repository. I followed the instructions in gitcore-tutorial. I typed "GIT_DIR=my-git.git git init" per instruction. But, I got command not found. I do not think this is the correct command. How should I do? I use C-Shell.
> 
> http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html
> 
> %mkdir my-git.git
> %GIT_DIR=my-git.git git init
> 
> GIT_DIR=my-git.git: Command not found.

Instead you can do:

  $ git --git-dir=my-git.git init

The --git-dir option does the same thing that GIT_DIR= was doing
in a Bourne shell.

-- 
Shawn.

```

## Gary Yang, 2008-11-19 01:21

Subject: Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
Message-ID: <142315.9815.qm@web37908.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/142315.9815.qm%40web37908.mail.mud.yahoo.com
In-Reply-To: <20081118231925.GW2932@spearce.org>

```


The command, "git --git-dir=my-git.git init" works. But, I got another error.

http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html

The document says that, Your "public repository" is now ready to accept your changes. Come back to the machine you have your private repository. From there, run this
        command:
 
            $ git push <public-host>:/path/to/my-git.git master


However, I got "fatal: Not a git repository" error. Do you have any idea?


git push linuxgit01:/pub/git/u-boot.git master
fatal: Not a git repository

inuxgit01 is the box I ran the command, "git --git-dir=u-boot.git init".

Thanks,


Gary




--- On Tue, 11/18/08, Shawn O. Pearce <spearce@spearce.org> wrote:

> From: Shawn O. Pearce <spearce@spearce.org>
> Subject: Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
> To: "Gary Yang" <garyyang6@yahoo.com>
> Cc: git@vger.kernel.org
> Date: Tuesday, November 18, 2008, 3:19 PM
> Gary Yang <garyyang6@yahoo.com> wrote:
> > Hi,
> > 
> > I want to make a public repository. I followed the
> instructions in gitcore-tutorial. I typed
> "GIT_DIR=my-git.git git init" per instruction.
> But, I got command not found. I do not think this is the
> correct command. How should I do? I use C-Shell.
> > 
> >
> http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html
> > 
> > %mkdir my-git.git
> > %GIT_DIR=my-git.git git init
> > 
> > GIT_DIR=my-git.git: Command not found.
> 
> Instead you can do:
> 
>   $ git --git-dir=my-git.git init
> 
> The --git-dir option does the same thing that GIT_DIR= was
> doing
> in a Bourne shell.
> 
> -- 
> Shawn.


      

```

## Gary Yang, 2008-11-19 01:28

Subject: Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
Message-ID: <299370.3004.qm@web37902.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/299370.3004.qm%40web37902.mail.mud.yahoo.com
In-Reply-To: <142315.9815.qm@web37908.mail.mud.yahoo.com>

```

inuxgit01 is the box I want to make public repository. At my own box, linux12, I ran the command, git push linuxgit01:/pub/git/u-boot.git master

What I did wrong?

Thanks.

--- On Tue, 11/18/08, Gary Yang <garyyang6@yahoo.com> wrote:

> From: Gary Yang <garyyang6@yahoo.com>
> Subject: Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
> To: "Shawn O. Pearce" <spearce@spearce.org>
> Cc: git@vger.kernel.org
> Date: Tuesday, November 18, 2008, 5:21 PM
> The command, "git --git-dir=my-git.git init"
> works. But, I got another error.
> 
> http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html
> 
> The document says that, Your "public repository"
> is now ready to accept your changes. Come back to the
> machine you have your private repository. From there, run
> this
>         command:
>  
>             $ git push
> <public-host>:/path/to/my-git.git master
> 
> 
> However, I got "fatal: Not a git repository"
> error. Do you have any idea?
> 
> 
> git push linuxgit01:/pub/git/u-boot.git master
> fatal: Not a git repository
> 
> inuxgit01 is the box I ran the command, "git
> --git-dir=u-boot.git init".
> 
> Thanks,
> 
> 
> Gary
> 
> 
> 
> 
> --- On Tue, 11/18/08, Shawn O. Pearce
> <spearce@spearce.org> wrote:
> 
> > From: Shawn O. Pearce <spearce@spearce.org>
> > Subject: Re: How to make public repository
> GIT_DIR=my-git.git git-init Command not found.
> > To: "Gary Yang" <garyyang6@yahoo.com>
> > Cc: git@vger.kernel.org
> > Date: Tuesday, November 18, 2008, 3:19 PM
> > Gary Yang <garyyang6@yahoo.com> wrote:
> > > Hi,
> > > 
> > > I want to make a public repository. I followed
> the
> > instructions in gitcore-tutorial. I typed
> > "GIT_DIR=my-git.git git init" per
> instruction.
> > But, I got command not found. I do not think this is
> the
> > correct command. How should I do? I use C-Shell.
> > > 
> > >
> >
> http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html
> > > 
> > > %mkdir my-git.git
> > > %GIT_DIR=my-git.git git init
> > > 
> > > GIT_DIR=my-git.git: Command not found.
> > 
> > Instead you can do:
> > 
> >   $ git --git-dir=my-git.git init
> > 
> > The --git-dir option does the same thing that GIT_DIR=
> was
> > doing
> > in a Bourne shell.
> > 
> > -- 
> > Shawn.
> 
> 
>       
> --
> To unsubscribe from this list: send the line
> "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at 
> http://vger.kernel.org/majordomo-info.html


      

```

## Gary Yang, 2008-11-19 01:35

Subject: Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
Message-ID: <674246.30132.qm@web37901.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/674246.30132.qm%40web37901.mail.mud.yahoo.com
In-Reply-To: <299370.3004.qm@web37902.mail.mud.yahoo.com>

```
Never mind. I figured it out. I need to cd to u-boot.git (my local git repository, the run the command, git push linuxgit01:/pub/git/u-boot.git master.


--- On Tue, 11/18/08, Gary Yang <garyyang6@yahoo.com> wrote:

> From: Gary Yang <garyyang6@yahoo.com>
> Subject: Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
> To: "Shawn O. Pearce" <spearce@spearce.org>
> Cc: git@vger.kernel.org
> Date: Tuesday, November 18, 2008, 5:28 PM
> inuxgit01 is the box I want to make public repository. At my
> own box, linux12, I ran the command, git push
> linuxgit01:/pub/git/u-boot.git master
> 
> What I did wrong?
> 
> Thanks.
> 
> --- On Tue, 11/18/08, Gary Yang <garyyang6@yahoo.com>
> wrote:
> 
> > From: Gary Yang <garyyang6@yahoo.com>
> > Subject: Re: How to make public repository
> GIT_DIR=my-git.git git-init Command not found.
> > To: "Shawn O. Pearce"
> <spearce@spearce.org>
> > Cc: git@vger.kernel.org
> > Date: Tuesday, November 18, 2008, 5:21 PM
> > The command, "git --git-dir=my-git.git init"
> > works. But, I got another error.
> > 
> >
> http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html
> > 
> > The document says that, Your "public
> repository"
> > is now ready to accept your changes. Come back to the
> > machine you have your private repository. From there,
> run
> > this
> >         command:
> >  
> >             $ git push
> > <public-host>:/path/to/my-git.git master
> > 
> > 
> > However, I got "fatal: Not a git repository"
> > error. Do you have any idea?
> > 
> > 
> > git push linuxgit01:/pub/git/u-boot.git master
> > fatal: Not a git repository
> > 
> > inuxgit01 is the box I ran the command, "git
> > --git-dir=u-boot.git init".
> > 
> > Thanks,
> > 
> > 
> > Gary
> > 
> > 
> > 
> > 
> > --- On Tue, 11/18/08, Shawn O. Pearce
> > <spearce@spearce.org> wrote:
> > 
> > > From: Shawn O. Pearce <spearce@spearce.org>
> > > Subject: Re: How to make public repository
> > GIT_DIR=my-git.git git-init Command not found.
> > > To: "Gary Yang"
> <garyyang6@yahoo.com>
> > > Cc: git@vger.kernel.org
> > > Date: Tuesday, November 18, 2008, 3:19 PM
> > > Gary Yang <garyyang6@yahoo.com> wrote:
> > > > Hi,
> > > > 
> > > > I want to make a public repository. I
> followed
> > the
> > > instructions in gitcore-tutorial. I typed
> > > "GIT_DIR=my-git.git git init" per
> > instruction.
> > > But, I got command not found. I do not think this
> is
> > the
> > > correct command. How should I do? I use C-Shell.
> > > > 
> > > >
> > >
> >
> http://manpages.ubuntu.com/manpages/intrepid/man7/gitcore-tutorial.html
> > > > 
> > > > %mkdir my-git.git
> > > > %GIT_DIR=my-git.git git init
> > > > 
> > > > GIT_DIR=my-git.git: Command not found.
> > > 
> > > Instead you can do:
> > > 
> > >   $ git --git-dir=my-git.git init
> > > 
> > > The --git-dir option does the same thing that
> GIT_DIR=
> > was
> > > doing
> > > in a Bourne shell.
> > > 
> > > -- 
> > > Shawn.
> > 
> > 
> >       
> > --
> > To unsubscribe from this list: send the line
> > "unsubscribe git" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at 
> > http://vger.kernel.org/majordomo-info.html
> 
> 
>       
> --
> To unsubscribe from this list: send the line
> "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at 
> http://vger.kernel.org/majordomo-info.html


      

```

## Alex Riesen, 2008-11-19 13:38

Subject: Re: How to make public repository GIT_DIR=my-git.git git-init Command not found.
Message-ID: <81b0412b0811190538t4c16b9dagc14ff84bf6689616@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0811190538t4c16b9dagc14ff84bf6689616%40mail.gmail.com
In-Reply-To: <138223.4849.qm@web37905.mail.mud.yahoo.com>

```
2008/11/19 Gary Yang <garyyang6@yahoo.com>:
> Hi,
>
> I want to make a public repository. I followed the instructions in gitcore-tutorial.
> I typed "GIT_DIR=my-git.git git init" per instruction. But, I got command not found.
> I do not think this is the correct command. How should I do? I use C-Shell.

git --bare init

```
