git - are there forks and pull requests on clean git?
问题描述
Can I use repository forking and pull requests when using only git (no github, gitlab, etc)? I did not find a guide where there are pull requests without using a git (CLI only). If these are where can I find guides and documentation?
解决方案
在理论上和实践中,您仍然可以使用 git 作为您的分布式版本控制系统 ( DVCS ),而无需像 GitHub/GitLab/BitBucket 之类的任何存储库托管服务,尽管使用此类服务是一个好主意,并且确实值得推荐。
如果fork你的意思是获取另一个 git 存储库的副本,那么是的,你可以通过使用clone
命令来实现,
git clone <path-to-another-git-repository>
一旦你有了克隆,你就可以像往常一样处理它。您可以验证您的远程是否指向原始git remote -v
存储库,如果您想将更新拉入任何存储库,只需确保正确设置特定存储库的远程。正确设置遥控器后,您可以使用git pull <remote> <branch-name>
. 同样,您可以将更改推送到。但是,如果您将更改推送到的远程仓库具有相同的签出分支,那么 git 将抛出错误,指出工作树变得不一致的可能性。
如果 git repo 位于同一系统上,<path-to-another-git-repository>
则将只是文件系统特定的路径。Git 支持多种协议,其中一种是本地协议。
推荐阅读
- java - 如果从流中收集,列表可以包含多个不同的 ChildType
- json - PowerShell 将 CSV 转换为嵌套的 Json
- wpf - 在按钮单击事件上刷新实时图表
- go - 追加时不将数组大小加倍
- r - 如何:通过不重复创建新数据框使我的代码在 R 中更高效?
- java - 杰克逊解析 XML
- http - 如何在 LAN 上托管 HTTPS API
- javascript - javascript dgram节点中的UDP pinger超时
- vue.js - 从 VueJS 中的表单输入字段动态创建 v-model
- node.js - 如何在 K8s 集群中将 Redis 与 NodeJS 中的服务连接起来?