In my remote bare repository the HEAD is pointing to "refs/heads/master" and I want it to point to "refs/heads/other".
I am not able to go to remote repository directory and run git symbolic-ref
. Is there any git command to achieve it? Or any other way?
If there is no way, does Github allow one to change the HEAD?
A symbolic ref is a regular file that stores a string that begins with ref: refs/ . For example, your . git/HEAD is a regular file whose contents is ref: refs/heads/master .
Remotes. The third type of reference that you'll see is a remote reference. If you add a remote and push to it, Git stores the value you last pushed to that remote for each branch in the refs/remotes directory.
GitBSLR will not automatically deduplicate anything, or otherwise create any symlinks for Git to follow. You have to create the symlinks yourself.
A refspec maps a branch in the local repository to a branch in a remote repository. This makes it possible to manage remote branches using local Git commands and to configure some advanced git push and git fetch behavior.
To change it in github, go to the admin section.
You can select the default branch from a dropdown there.
(There has been posted another question asking basically the same: How do I change a Git remote HEAD to point to something besides “master”, and there was more discussion there, with a reference to the Github group. So I'd just like to point anyone to that discussion as well.)
As we know, there is no universal answer.
But there are a specific answers for various git "farms" (where multiple users can manage git repos through a restricted interface: via http and ssh): http://Github.com, http://Gitorious.org, http://repo.or.cz, Girar (http://git.altlinux.org).
These specific answers might be useful for those reading this page and thinking about these specific services.
$ ssh git.alt help | fgrep branch default-branch [] $
for example ssh git.alt default-branch packages/autosshd.git sisyphus
to change the HEAD in the remote repo autosshd.git
to point to the sisyphus
branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With