git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Inconsistency in use of "--bare" between init & clone

From
Joe Ratterman <jratt0@gmail.com>
Date
Dec 13, 2007, 15:37 UTC
Message-ID
<331aa8280712130737h7300c739n59ee2fce6c4e4a9@mail.gmail.com>

I've been getting ready to support my organization in a change-over to git from cvs, and I've found a strange issue when creating bare repositories. The placement of the "--bare" option changes:

git --bare clone <url> == "--bare" is silently ignored git --bare init == Creates an empty bare repo

git clone --bare  ==  Clones the url into a new bare repo
git init --bare  ==  Error:
        usage: git-init [-q | --quiet]
[--template=<template-directory>] [--shared]
I assume there a reason for the lack of symmetry, but I don't understand it.

Thanks, Joe

$ git version git version 1.5.3.7.1157.gbf82a

Message 1 of 1 in “Inconsistency in use of "--bare" between init & clone”
  1. Joe RattermanDec 13, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.