Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git init --bare on git 1.5.4.3

Tags:

git

init

git-bare

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?

like image 609
fabb Avatar asked Sep 27 '26 01:09

fabb


1 Answers

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:

  • https://github.com/git/git/commit/74d3b23fe3771c769ccd5c97f6a46682b4061577

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

like image 70
Mark Longair Avatar answered Sep 29 '26 20:09

Mark Longair



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!