0

I have a self host gitlab ce service.

I can't see master branch of my respitory on website.

Try this after I found the problem:

  1. Push my local branch master to origin/master
(master)# git push -u origon/master
error: src refspec refs/heads/master does not match any.
error: failed to push some refs to 'origon/master'

git fetch is not working either. 2. create a new master branch on website . Not working

So I go checking the repository on gitlab server.Seems the master exist. But did not point to any commit.

root@Gitlab:/var/opt/gitlab/git-data/repositories/lianjc/Intelligent_Entrance_Guard.git# cat refs/heads/
for_origin_db  m2             master         
root@Gitlab:/var/opt/gitlab/git-data/repositories/lianjc/Intelligent_Entrance_Guard.git# cat refs/heads/
for_origin_db  m2             master         
root@Gitlab:/var/opt/gitlab/git-data/repositories/lianjc/Intelligent_Entrance_Guard.git# cat refs/heads/m
m2      master  
root@Gitlab:/var/opt/gitlab/git-data/repositories/lianjc/Intelligent_Entrance_Guard.git# cat refs/heads/master 
root@Gitlab:/var/opt/gitlab/git-data/repositories/lianjc/Intelligent_Entrance_Guard.git# cat refs/heads/m2     
852a5dfd5849ccb81def6f0ef223dbed87ff7f6e
root@Gitlab:/var/opt/gitlab/git-data/repositories/lianjc/Intelligent_Entrance_Guard.git# cat refs/heads/for_origin_db 
852a5dfd5849ccb81def6f0ef223dbed87ff7f6e

Can I just edit the file "refs/heads/master ", make it pointing to a commit ? Or anything I can do on the website?

Sorry for my poor english.

enter image description hereCan't post images.

bqbs
  • 1
  • 2

0 Answers0