threads / discuss / 44362

git clone --bare --origin incompatible?

Subject: git clone --bare --origin incompatible?

## tl;dr

3 messages between Oct 23, 2016 and Oct 23, 2016.

replies: 2people: 2as markdown or json

Roman Neuhauser· Oct 23, 2016, 11:03 UTC · lore
hello,
what is the reason clone --bare prohibits --origin?
  % git clone --bare -o fubar anything anywhere
  fatal: --bare and --origin fubar options are incompatible.
-- 
roman
Andreas Schwab· Oct 23, 2016, 12:29 UTC · re: Roman Neuhauser · lore

Re: git clone --bare --origin incompatible?

On Okt 23 2016, Roman Neuhauser <neuhauser@sigpipe.cz> wrote:
> what is the reason clone --bare prohibits --origin?
>
>   % git clone --bare -o fubar anything anywhere
>   fatal: --bare and --origin fubar options are incompatible.

Since a bare clone maps remote branches directly to local branches, without any remote-tracking branches, --origin doesn't make sense.

Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Roman Neuhauser· Oct 23, 2016, 12:50 UTC · re: Andreas Schwab · lore

Re: git clone --bare --origin incompatible?

# schwab@linux-m68k.org / 2016-10-23 14:29:55 +0200:
Show 9 quoted lines
> On Okt 23 2016, Roman Neuhauser <neuhauser@sigpipe.cz> wrote:
> 
> > what is the reason clone --bare prohibits --origin?
> >
> >   % git clone --bare -o fubar anything anywhere
> >   fatal: --bare and --origin fubar options are incompatible.
> 
> Since a bare clone maps remote branches directly to local branches,
> without any remote-tracking branches, --origin doesn't make sense.

is it going to break something though? i can still go and rename the remote in the bare repo's config file afterwards.

-- 
roman

← back to recent threads