Cloning leads to empty branch main and confusing warning #1

Closed
opened 2025-05-19 12:11:29 +02:00 by hethi · 1 comment

Cloning this example repository is a bit confusing, as it leads to an empty branch main on the local side, while this branch doesn't exist remotely.

Maybe the codeberg repository is configured with main as default branch, while this branch doesn't exist?

$ git clone ssh://git@codeberg.org/fsfe/reuse-tutorial-example.git
Cloning into 'reuse-tutorial-example'...
remote: Enumerating objects: 14, done.
remote: Total 14 (delta 0), reused 0 (delta 0), pack-reused 14 (from 1)
Receiving objects: 100% (14/14), 14.20 KiB | 909.00 KiB/s, done.
Resolving deltas: 100% (2/2), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout

$ git status
On branch main

No commits yet

nothing to commit (create/copy files and use "git add" to track)

$ git branch -a | cat
  remotes/origin/compliant
  remotes/origin/non-compliant
Cloning this example repository is a bit confusing, as it leads to an empty branch `main` on the local side, while this branch doesn't exist remotely. Maybe the codeberg repository is configured with `main` as default branch, while this branch doesn't exist? ```console $ git clone ssh://git@codeberg.org/fsfe/reuse-tutorial-example.git Cloning into 'reuse-tutorial-example'... remote: Enumerating objects: 14, done. remote: Total 14 (delta 0), reused 0 (delta 0), pack-reused 14 (from 1) Receiving objects: 100% (14/14), 14.20 KiB | 909.00 KiB/s, done. Resolving deltas: 100% (2/2), done. warning: remote HEAD refers to nonexistent ref, unable to checkout $ git status On branch main No commits yet nothing to commit (create/copy files and use "git add" to track) $ git branch -a | cat remotes/origin/compliant remotes/origin/non-compliant ```
Owner

This is fixed. It was configured with main as the default branch. compliant is now the default branch.

Thanks!

This is fixed. It was configured with `main` as the default branch. `compliant` is now the default branch. Thanks!
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
fsfe/reuse-tutorial-example#1
No description provided.