3

We have got git 1.5.4.3 (Version from Feb'08) on our server. As it seems, there was no option --bare back then.

How can I create a bare repository then?

Creating it locally and scp'ing it to the server would be an option, but way too much effort. Or is it possible with a local git command to create a new remote repository?

simont
  • 68,704
  • 18
  • 117
  • 136
fabb
  • 11,660
  • 13
  • 67
  • 111

1 Answers1

6

With such an early version of git, you can still create a bare repository with:

git --bare init

... rather than the more usual git init --bare.


Out of interest, I found this out from the message for the commit that introduced the --bare option to git init:

That commit is contained in git version v1.5.6 and later.

Mark Longair
  • 446,582
  • 72
  • 411
  • 327
  • 1
    +1 from me, other than the fact that IMHO `git --bare init` is much more usual for precisely the reason that it has been around for a lot longer. – CB Bailey Aug 30 '11 at 09:50