需要有关创建当前项目的克隆、分叉或分支的建议
我已经使用 git 和 svn 有一段时间了,随着时间的推移,我的项目变得越来越复杂,我开始知道项目是如何实际管理的。
现在我已经了解了分叉和分支的基本概念。通过分叉,您将创建现有项目的克隆,您可以在其中工作。通过分支,你可以继续在同一个项目中工作,但只是走向不同的方向。
我知道这一点,但我仍然无法决定选择哪个,因为我不想最终选择错误的方法。这就是为什么我要寻求一些建议。
--
我正在做的项目是一个网站。该网站已完成并向公众运行。我还有两个任务要完成,它们是:
1)因为网站刚刚上线,我仍然每天进行一些小的更改。一些与 SEO 相关的内容、一些小的浏览器修复、一些小的内容更改。基本上我还是对项目做了一些小改动。
2)我的第二个任务是扩展当前的项目。我正在创建一些公众不可见的私人内容,但它属于同一个项目。它们是公司实习生将使用的页面。
所以基本上我需要处理当前的项目以及分支/分支。最终,当私有页面完成后,它将再次变成1个项目。
现在的问题是,我应该创建当前项目的分支还是分叉。
I have been using both git and svn for quite some time now, and as the time passes, and my projects become more complex, I am starting to know how projects are actually managed.
Now I already know the basic concepts of forking and branching. With forking you will create a clone of the existing project, in which you can work. With branching you keep working in the same project, but you just go a different direction.
I know this, but I can still not decide which to choose, because I do not want to end up choosing the wrong method. That's why I am asking some advice.
--
The projects I am working on is a website. The website is finished and running for the public. I still have two tasks to complete, and they are:
1) Because the website is just launched, I still make small daily changes. Some SEO related, some minor browser fixes, some small content changes. Basically I still make small changes to the project.
2) The second task I have is expanding the current project. I am creating some private content that will not be visible to the public, but it belongs to the same project. They are pages that will be used by the company intern.
So basically I will need to work on the current project, and on the fork / branch. Eventually, when the private pages are done, it will become 1 project again.
Now the question is, should I create a branch or a fork of the current project.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一般来说,区别很简单。如果您正在创建一个分叉,那么您永远不会打算将分叉中的新工作放回到您分叉的东西中。
如果你打算把你的工作放回去,那么你需要一个分支机构。在你的情况下,你肯定想分支。当然,如果您认为某个分支不起作用,您可以选择放弃该分支。每个 VCS 工具都有一种管理分支的方法,允许您将更改合并回主干/主干(您分支的代码行)。
In general the difference is simple. If you are creating a fork, then you never intend to put your new work in the fork back into the thing you forked from.
If you intend to put your work back, then you want a branch. In your cases you certainly want to branch. Of course you can choose to abandon a branch if you decide that it does not work out. Each of the VCS tools has a means of managing branches to allow you to merge the changes back to the master/trunk (the code line from which you branched).