DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far...

Welcome! This is a Q&A website for computer programmers and users alike, focused on helping fellow programmers and users. Read more

What are you stuck on? Ask a question and hopefully somebody will be able to help you out!
0 votes

When my remote repository was created the default branch was master, and HEAD points to refs/heads/master. But after I removed the master branch in my local repository in order to replace it with main, I could not update the remote HEAD which is still pointing at master instead of refs/heads/main.

by

1 Answer

0 votes
 
Best answer
  1. The first step is to enable the "symbolic-ref" command in ~/.gitolite.rc like this:

     ENABLE => [
         'symbolic-ref',
     ]
    
  2. Then the HEAD reference can be changed like this:

     ssh git@host symbolic-ref <repo> HEAD refs/heads/main
    
by
Contributions licensed under CC0
...