如何将Git遥控器的HEAD引用设置为指向除"master"之外的其他内容?
我的项目有一个不使用"主"分支的策略(所有分支都有有意义的名称).此外,规范主存储库只能通过ssh://访问,没有shell访问权限(如GitHub或Unfuddle).
我的问题是远程存储库仍然有一个HEAD引用refs/heads/master,但我需要它指向一个不同的分支.这导致两个问题:
克隆回购时,有这个,
警告:远程HEAD是指不存在的ref,无法结帐.
这令人困惑和不方便.
基于Web的代码浏览器依赖于HEAD作为浏览树的基础.我需要HEAD指向一个有效的分支,然后.
我在projectlocker上设置了一个git项目来推送我的git文件.然后我进入了初始化git项目并暂存我的文件的目录.最后我尝试使用此命令将项目推送到projectlocker:
$ git push git-smichaels@free5.projectlocker.com:helloworld.git
Run Code Online (Sandbox Code Playgroud)
它会生成此错误:
warning: You did not specify any refspecs to push, and the current remote
warning: has not configured any push refspecs. The default action in this
warning: case is to push all matching refspecs, that is, all branches
warning: that exist both locally and remotely will be updated. This may
warning: not necessarily be what you want to happen.
warning:
warning: You can specify what action you want to take in this case, and
warning: …Run Code Online (Sandbox Code Playgroud)