如何在不使用Github的情况下使用Git在项目中进行协作? [英] How to collaborate in a project using Git without using Github?

查看:147
本文介绍了如何在不使用Github的情况下使用Git在项目中进行协作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Git和Github的初学者,但仍然对它们感到困惑.据说当与其他人合作时,我们可以在没有Github的情况下使用Git.但是,也有人说Git在本地计算机上工作.如果我们不使用Github,那么当Git仅在本地工作时,我们如何进行协作?

I am a beginner to Git and Github and still confused about them. It is said that we can use Git without Github when collaborating with other people. However, it is also said that Git works locally on one's computer. If we do not use Github, how can we collaborate while Git works only locally?

推荐答案

您可以在存储库之间交换提交内容,并在可以方便地命名有趣的内容的范围内进行协作.而已.真的:这就是全部.

You collaborate by swapping commits around among repositories and cooperating to whatever extent you find convenient on what to name interesting ones. That's it. Really: that's all there is to it.

Github运行一台服务器,该服务器使用git支持交换提交和refname的大多数主要协议,并且它具有Web GUI,该Web GUI极大地帮助了方便的抽象方法和用于浏览器介导的访问的功能,但是当它出现时一直到它都与交换提交有关.有很多方法可以做到这一点,因为底层结构非常简单.如此简单,人们不敢相信.

Github runs a server that speaks most of the main protocols git supports for swapping commits and refnames around, and it has a web GUI on top of a big helping of handy abstractions and features for browser-mediated access, but when it comes right down to it it's all about swapping commits. There's lots and lots of ways to do that, because the underlying structure is (quite literally incredibly) simple. It's so simple people don't believe it.

您的存储库是您的;在他们身上发生的事情是你一个人的事.想法是将提交放入另一个存储库,这是在某种程度上达成共识的(对于每个回购),将它们发布.至少某些(包括您自己的)存储库中的内容将包括草稿提交和随机注释,实验以及没人想要的彻底垃圾.没有人比在乎您办公桌上笔记中的内容更重要,而是您发布的内容很重要.

Your repos are yours; what goes on in them is your business alone. The idea is getting commits into another repository is in some agreed-on (for each repo) sense publishing them. What's in at least some (including your own) repos will include rough-draft commits and random notes, experiments and outright garbage that nobody wants. Nobody cares what's in your personal repos any more than they care what's in the notes on your desk, it's the ones you publish that matters.

在单个项目的工作流程中使用多个存储库是很常见的-为真正的实验性工作创建沙箱克隆,即使是最大的存储库,也不需要两秒钟的时间(任何后续结帐都可能需要一些时间).您几乎没有任何想法就开始对tmpfs进行克隆.

Using multiple repos for a single-project workflow is common -- creating a sandbox clone for really experimental work quite literally doesn't take two seconds for even the largest repositories (any subsequent checkout might take some time). You start doing clones to a tmpfs with barely a thought.

在每个回购中,您都拥有世界一流的vcs的全部功能,供您自己专有和个人使用.

And in every repo you have the full power of a world-class vcs available for your own exclusive and personal use.

这篇关于如何在不使用Github的情况下使用Git在项目中进行协作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆