我有一个分支库:master和devel。Master是默认的。我想把master重命名为prod并使其成为默认值(并将其推送到服务器)。该怎么做?
此仓库托管在gitolite中(如果有影响)。
我有一个分支库:master和devel。Master是默认的。我想把master重命名为prod并使其成为默认值(并将其推送到服务器)。该怎么做?
此仓库托管在gitolite中(如果有影响)。
要将HEAD的符号引用更改为您推送到服务器的分支(prod
),您需要访问该服务器。
git-symbolic-ref HEAD refs/head/prod
/home/git/gitolite# gitolite symbolic-ref -h
Usage: ssh git@host symbolic-ref <repo> <arguments to git-symbolic-ref>
allow 'git symbolic-ref' over a gitolite connection
通过ssh命令,您实际上可以更改由gitolite(V3)管理的远程代码库的HEAD。
ssh git@host symbolic-ref <repo> refs/head/prod
我不得不使用(Gitolite 3.5.3):
ssh git@host symbolic-ref <repo> HEAD refs/heads/prod