threads / discuss / 31670

git gui does not open bare repositories

Subject: git gui does not open bare repositories

## tl;dr

11 messages between Sep 28, 2012 and Oct 1, 2012.

replies: 10people: 4as markdown or json

Angelo Borsotti· Sep 28, 2012, 07:50 UTC · lore
Hello,
I have created a bare repository:
$ mkdir remote.git

angelo@ANGELO-PC /d/gtest (master) $ git init --bare Initialized empty Git repository in d:/gtest/

and then tried to open it with the git gui, but have got the message: "remote.git is not a git repository".

The git gui is the one that I have downloaded from the git web site for windows:

gt-gui version 0.16.GITGUI git version 1.7.11.msysgit.1

Thank you -Angelo Borsotti

Frans Klaver· Sep 28, 2012, 08:08 UTC · re: Angelo Borsotti · lore

Re: git gui does not open bare repositories

On Fri, Sep 28, 2012 at 9:50 AM, Angelo Borsotti <angelo.borsotti@gmail.com> wrote:

Show 7 quoted lines
> I have created a bare repository:
>
> $ mkdir remote.git
>
> angelo@ANGELO-PC /d/gtest (master)
> $ git init --bare
> Initialized empty Git repository in d:/gtest/

This creates a bare repository in d:/gtest, not in d:/gtest/remote.git. You'll need to cd into remote.git to create a bare repo.

> and then tried to open it with the git gui, but have got the message:
> "remote.git is not a git repository".
So this message is correct.

Be as it may, as soon as you've initialized the repo as required, git gui will (probably) tell you:

"Cannot use bare repository:
d:/gtest/remote.git"

So nothing gained there. So I'm wondering what you expect git gui to give you in a bare repo? It seems to me that this tool is specifically aimed at non-bare repos, allowing for creating commits, merges and whatnot; all things you cannot typically do in a bare repo.

Frans
Frans Klaver· Sep 28, 2012, 08:35 UTC · lore

Re: git gui does not open bare repositories

Hi,
Please remember to reply to all when discussing things on the git mailing list.

On Fri, Sep 28, 2012 at 10:29 AM, Angelo Borsotti <angelo.borsotti@gmail.com> wrote:

Show 26 quoted lines
> Hello
>
> I apologise for having used the wrong script to reproduce the error.
> This is  the right one:
>
> angelo@ANGELO-PC /d/gtest (master)
> $ mkdir remote.git
>
> angelo@ANGELO-PC /d/gtest (master)
> $ cd remote.git
>
> angelo@ANGELO-PC /d/gtest/remote.git (master)
> $ git init --bare
> Initialized empty Git repository in d:/gtest/remote.git/
>
> Now with the git gui I try to open the d:/gtest/remote.git/ and
> receive the message
> that it is not a git repository.
>
> I understand that the gui is mostly aimed to non-bare repositories,
> but in such a case
> it would be better it could give me a message like, e.g. "could not
> open a bare repository"
> instead of telling me that it is not a git repository (I thought my
> bare repository was
> corrupt, and tried to figure out what was wrong with it).

Actually git-gui 0.16.0 is telling me that it cannot use bare repositories, much in the vein of what I wrote earlier. Don't know if it matters that I'm on Linux though.

Frans
Stefan Näwe· Sep 28, 2012, 08:44 UTC · re: Frans Klaver · lore

Re: git gui does not open bare repositories

Am 28.09.2012 10:35, schrieb Frans Klaver:
Show 37 quoted lines
> Hi,
> 
> Please remember to reply to all when discussing things on the git mailing list.
> 
> On Fri, Sep 28, 2012 at 10:29 AM, Angelo Borsotti
> <angelo.borsotti@gmail.com> wrote:
>> Hello
>>
>> I apologise for having used the wrong script to reproduce the error.
>> This is  the right one:
>>
>> angelo@ANGELO-PC /d/gtest (master)
>> $ mkdir remote.git
>>
>> angelo@ANGELO-PC /d/gtest (master)
>> $ cd remote.git
>>
>> angelo@ANGELO-PC /d/gtest/remote.git (master)
>> $ git init --bare
>> Initialized empty Git repository in d:/gtest/remote.git/
>>
>> Now with the git gui I try to open the d:/gtest/remote.git/ and
>> receive the message
>> that it is not a git repository.
>>
>> I understand that the gui is mostly aimed to non-bare repositories,
>> but in such a case
>> it would be better it could give me a message like, e.g. "could not
>> open a bare repository"
>> instead of telling me that it is not a git repository (I thought my
>> bare repository was
>> corrupt, and tried to figure out what was wrong with it).
> 
> 
> Actually git-gui 0.16.0 is telling me that it cannot use bare
> repositories, much in the vein of what I wrote earlier. Don't know if
> it matters that I'm on Linux though.

I get "Not a Git repository: remote.git" as well, when I run git gui "somewhere" (i.e. not in "remote.git") and the select "Open Existing Repository".

I get "Cannot use bare repository: .../remote.git" when I run git gui from inside the "remote.git" directory.

Both on WinXP with msysGit.
Stefan
-- 
----------------------------------------------------------------
/dev/random says: Unless you're the lead dog, the view never changes.
python -c "print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')"
Angelo Borsotti· Sep 28, 2012, 12:09 UTC · re: Stefan Näwe · lore

Re: git gui does not open bare repositories

I have removed the Italian localization so as to make git gui use the English one. The result is the same as I have found before. The message is: " Not a Git repository: remote.git". Thus, the misleading message is there.

-Angelo
Ben Smith-Mannschott· Sep 28, 2012, 14:15 UTC · re: Angelo Borsotti · lore

Re: git gui does not open bare repositories

Hi Angelo,

On Fri, Sep 28, 2012 at 2:09 PM, Angelo Borsotti <angelo.borsotti@gmail.com> wrote:

Show 5 quoted lines
> I have removed the Italian localization so as to make git gui use the
> English one.
> The result is the same as I have found before.
> The message is: " Not a Git repository: remote.git".
> Thus, the misleading message is there.

I'm not seeing what you're seeing. I'm running git 1.7.12.1 and I get exactly this message:

    Cannot use bare repository:
    /Users/bsmith/tmp/repo.git
When I do exactly this:
    $ cd ~/tmp
    $ mkdir repo.git
    $ cd repo.git
    $ git init --bare
    $ git gui
What, exactly, are you doing?
// Ben
Ben Smith-Mannschott· Sep 28, 2012, 19:43 UTC · re: Angelo Borsotti · lore

Re: git gui does not open bare repositories

On Fri, Sep 28, 2012 at 6:46 PM, Angelo Borsotti <angelo.borsotti@gmail.com> wrote:

Show 5 quoted lines
> Hi Ben,
>
> I am running git gui on Windows 7. Are you running it on Linux?
>
> -Angelo
Mac OS X
// Ben
Stefan Näwe· Oct 1, 2012, 06:22 UTC · re: Stefan Näwe · lore

Re: git gui does not open bare repositories

Am 28.09.2012 10:44, schrieb Stefan Näwe:
> I get "Not a Git repository: remote.git" as well, when I run
> git gui "somewhere" (i.e. not in "remote.git") 
i.e.:
  $ cd /not/a/repo
  $ git gui
> and the select "Open Existing Repository".
> 
> I get "Cannot use bare repository: .../remote.git" when I run git gui
> from inside the "remote.git" directory.
i.e.:
  $ cd /path/to/bare-repo.git
  $ git gui
> Both on WinXP with msysGit.
And the same on Linux with Git v1.7.12
Stefan
-- 
----------------------------------------------------------------
/dev/random says: Press any key to continue or any other key to quit...
python -c "print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')"

← back to recent threads