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

Re: clone bug

From
Andreas Schwab <schwab@linux-m68k.org>
Date
Jan 12, 2012, 14:36 UTC
Message-ID
<m28vldj8ch.fsf@igel.home>
In-Reply-To
<CAO1Zr+pSLwRbsEZ_0LCeE2qLn+S=iMKVcMjqtYrmiBoQmjac_A@mail.gmail.com>
Alexey Kuznetsov <kuznetsov.alexey@gmail.com> writes:
Show 8 quoted lines
> axet-laptop:123 axet$ git branch
> * master
> # git remote add common https://github.com/axet/common-bin.git
> # git fetch common
> From https://github.com/axet/common-bin
>  * [new branch]      master     -> common/master
>
> ?? already strange master (local) to the remote common/master

The message means: the remote ref 'refs/heads/master' is stored locally in 'refs/remotes/common/master'.

> axet-laptop:123 axet$ git push
> To https://github.com/axet/common-bin.git
>  ! [rejected]        master -> master (non-fast-forward)

"git push" is the same as "git push common" ('common' is the current branch's remote). Since branch.master.push is not defined this then uses the push.default config option to determine the action. The default is 'matching', which means that local branch names are matched against remote branch names. Local branch master matches remote branch master. Note that this disregards the setting for branch.master.upstream. If you do not want that you should set push.default to 'upstream'.

See the examples in git-push(1) for more details.
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."
Previous: Thomas Rast
Message 3 of 3 in “clone bug”
  1. Alexey KuznetsovJan 12, 2012
  2. Thomas RastJan 12, 2012
  3. Andreas SchwabJan 12, 2012

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.