Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 如何向gerrit上传git回购协议?_Linux_Git_Msysgit_Gerrit - Fatal编程技术网

Linux 如何向gerrit上传git回购协议?

Linux 如何向gerrit上传git回购协议?,linux,git,msysgit,gerrit,Linux,Git,Msysgit,Gerrit,我在ubuntu服务器上安装了gerrit服务,我的PC作为客户端。 我在我的电脑上创建了一个git repo(使用msysgit),问题是:我如何将git repo上传到Ubuntu服务器?我应该先在Ubuntu服务器上做一些工作吗(我刚刚安装了gerrit和git服务)?首先,你需要在gerrit服务器上使用 接下来,根据需要编辑项目权限,为您的用户(可能是管理员组)添加以下内容: 创建引用 伪造提交者身份 伪造作者身份 这允许您上传现有的历史记录,可能是由不同的人提交的,而无需查看您选

我在ubuntu服务器上安装了gerrit服务,我的PC作为客户端。
我在我的电脑上创建了一个git repo(使用msysgit),问题是:我如何将git repo上传到Ubuntu服务器?我应该先在Ubuntu服务器上做一些工作吗(我刚刚安装了gerrit和git服务)?

首先,你需要在gerrit服务器上使用

接下来,根据需要编辑项目权限,为您的用户(可能是管理员组)添加以下内容:

  • 创建引用
  • 伪造提交者身份
  • 伪造作者身份
这允许您上传现有的历史记录,可能是由不同的人提交的,而无需查看您选择的每个提交

最后,推送您的代码:

git remote add gerrit gerritserver:project
git push gerrit master:refs/heads/master