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

some git confusion (where git's advice didn't help)

From
UWUlrich Windl <ulrich.windl@rz.uni-regensburg.de>
Date
May 14, 2019, 09:54 UTC
Message-ID
<5CDA9063020000A10003131D@gwsmtp.uni-regensburg.de>
Hi!
I was fighting with a remote branch being missing:
> git branch
  f-systemd
  integration
  master
* next
> git pull
Already up-to-date.
> git pull --all

Fetching origin Already up-to-date.

> git fetch f-gcc-4.8

fatal: 'f-gcc-4.8' does not appear to be a git repository fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

> git fetch origin
> git branch
  f-systemd
  integration
  master
* next
> git branch -r
  origin/HEAD -> origin/f-systemd
  origin/backport-0.0
  origin/backport-0.1
  origin/f-gcc-4.8
  origin/f-manual-peak-reset
  origin/f-read-failure
  origin/f-spec-RA
  origin/f-start-notice
  origin/f-status-dir
  origin/f-systemd
  origin/f-systemd-generator
  origin/f-usage
  origin/master
  origin/next
> git branch --track origin/f-gcc-4.8
Branch origin/f-gcc-4.8 set up to track local branch next.
> git fetch
> git branch
  f-systemd
  integration
  master
* next
  origin/f-gcc-4.8
> git merge f-gcc-4.8
merge: f-gcc-4.8 - not something we can merge
Did you mean this?
        origin/f-gcc-4.8
> git merge origin/f-gcc-4.8

warning: refname 'origin/f-gcc-4.8' is ambiguous. Already up-to-date.

### So actually this advice wasn't helpful at all. Cause of the problem most likely was "git branch --track origin/f-gcc-4.8" that "imported" the branch under the same name as the remote branch is referenced.

Actually this was just an addition to my previous message about missing remote branches after clone... (Seen with git 2.12.3)

My local "solution" was: git branch -d origin/f-gcc-4.8

Regards, Ulrich

Next: Jeff King
Message 1 of 7 in “some git confusion (where git's advice didn't help)”
  1. Ulrich WindlMay 14, 2019
  2. Jeff KingMay 14, 2019
  3. Duy NguyenMay 14, 2019
  4. Jeff KingMay 14, 2019
  5. 0/2 some fixes for help_unknown_ref()Jeff King, May 14, 2019
  6. 1/2 help_unknown_ref(): duplicate collected refnamesJeff King, May 14, 2019
  7. 2/2 help_unknown_ref(): check for refname ambiguityJeff King, May 14, 2019

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.