Thread (11 messages) 11 messages, 3 authors, 2022-09-22

fatal: options '--bare' and '--origin foo' cannot be used together

From: John A. Leuenhagen <hidden>
Date: 2022-09-21 19:33:16

Hi all,

I often like to change the name of the remote that I clone repositories
from, as "origin" is too generic for me when I have more than one
remote.

Usually, I only remember after I clone, and wind up doing `git remote
rename origin foo`. I'd like to get in the habit of instead doing
`git clone -o foo https://link.to/foo.git`. However, when I tried doing
this with --bare, I got the error that I've made the subject of this
email. Why can't I do this?

When I try to do `git remote rename origin foo` in the bare repository
(cloned without -o foo), I get a different error:
fatal: could not unset 'remote.foo.fetch'
However, `git config remote.foo.fetch` indicates that this value is not
set.

Why does this behavior differ from the equivalent commands on a non-bare
repository?
-- 
John
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help