简体   繁体   English

在没有`git clone`的情况下编辑git仓库的内容

[英]Editing the content of git repository without `git clone`

I want to update a remote rep by adding more content but am wondering if I can do that without having to clone all its content first. 我想通过添加更多内容来更新远程代表,但想知道是否可以不必先克隆其所有内容就能做到这一点。

Is it possible to establish the same kind of connection between the folder on my machine and an existing remote rep without downloading the remote content? 是否可以在我的机器上的文件夹和现有的远程代表之间建立相同类型的连接而无需下载远程内容?

No. Git is a distributed source code repository. 不可以。Git是一个分布式源代码存储库。 You work with a complete copy of the remote repository, then push changes after you've resolved the merge collisions, if there are any. 您可以使用远程存储库的完整副本,然后在解决合并冲突(如果有)之后推送更改。 I suspect you don't want to clone a rather large git repository. 我怀疑您不想克隆一个很大的git存储库。

Note that my suggestion involves an external system called Gerrit (code review web system) but Gerrit has such a feature: 请注意,我的建议涉及一个称为Gerrit(代码审查Web系统)的外部系统,但是Gerrit具有这样的功能:

https://gerrit-review.googlesource.com/Documentation/user-inline-edit.html https://gerrit-review.googlesource.com/Documentation/user-inline-edit.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM