You are not logged in.

#1 2025-12-16 16:24:44

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,724
Website

unable to fetch remote branches on gitlab.archlinux.org [solved]

I am unable to fetch remote branches on my repo hosted on gitlab.archlinux.org. I created a fresh clone:

git clone git@gitlab.archlinux.org:graysky/memtest86plus.git

I see my remote branch called 8 yet I cannot fetch it:

% git branch -a                   
* main
  remotes/origin/8
  remotes/origin/HEAD -> origin/main
  remotes/origin/main

% git fetch --all
(returns nothing)

% git branch --sort=-committerdate
* main

The .git/config looks right:

% cat .git/config 
[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[remote "origin"]
	url = git@gitlab.archlinux.org:graysky/memtest86plus.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
	remote = origin
	merge = refs/heads/main

Last edited by graysky (2025-12-16 16:34:01)

Offline

#2 2025-12-16 16:28:47

gromit
Administrator
From: Germany
Registered: 2024-02-10
Posts: 1,472
Website

Re: unable to fetch remote branches on gitlab.archlinux.org [solved]

I don't quite understand what the problem is here...? You can just check the branch out like so:

$ git clone git@gitlab.archlinux.org:graysky/memtest86plus.git 130 ↵
Cloning into 'memtest86plus'...
remote: Enumerating objects: 122, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 122 (delta 17), reused 31 (delta 13), pack-reused 84 (from 1)
Receiving objects: 100% (122/122), 24.26 KiB | 12.13 MiB/s, done.
Resolving deltas: 100% (38/38), done.

$ cd memtest86plus 

$ git switch 8                         
branch '8' set up to track 'origin/8'.
Switched to a new branch '8'

Offline

#3 2025-12-16 16:30:57

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,724
Website

Re: unable to fetch remote branches on gitlab.archlinux.org [solved]

I never used git switch before ... with my github hosted repos, git branch --sort=-committerdate shows the remote branches I fetched locally. Must be a different way gitlab is working.

Offline

#4 2025-12-16 16:32:45

gromit
Administrator
From: Germany
Registered: 2024-02-10
Posts: 1,472
Website

Re: unable to fetch remote branches on gitlab.archlinux.org [solved]

Git switch is just the "modern" version for a lot of things that the git checkout command does smile

Offline

#5 2025-12-16 16:33:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,724
Website

Re: unable to fetch remote branches on gitlab.archlinux.org [solved]

Nice, learned something. Thank you gromit.

Offline

Board footer

Powered by FluxBB