Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HEAD of Cloud Source Repository is not pointing to any commit

Is there any way to configure the Cloud Source Repository to point the HEAD to the latest commit?

I created a new repository in Cloud Source Repositories and the HEAD is not pointing to anything in the remote repo (GCP) although inside my local repository the HEAD does point to the latest commit.

Even if I can see the content in the remote repository (Cloud Source Repositories), the HEAD is not pointing to any commit.

The procedure I used is:

  1. Create the remote repository in Cloud Source Repositories.
  2. Create encryption keys.
  3. Register keys in GCP.
  4. Register keys in my local environment.
  5. Create files, add changes, commit changes, push changes to the remote repository.

Local repo:

enter image description here

Remote repo's HEAD:

enter image description here

Remote repo's main branch:

enter image description here

like image 803
CamelCamelius Avatar asked Jan 24 '26 09:01

CamelCamelius


1 Answers

It seems that Cloud Source Repositories autodetects the old naming convention for the main branch because the issue got resolved when I changed the name of the branch from main to master.

git branch -m main master
git push -u origin master
like image 116
CamelCamelius Avatar answered Jan 26 '26 23:01

CamelCamelius