如何将 Github 与共享存储库模型和 Aptana 结合使用?

发布于 2024-12-06 14:04:48 字数 501 浏览 4 评论 0原文

我们有一个小型开发团队,所有人都在同一个房间工作。我们正在建立 Github 来管理许多中/大型项目。我们都是 Github 新手,但希望使用它,因为我们的项目基于 Github 上托管的开源软件。

就我们的情况而言,“共享存储库模型”看起来很理想 - 每个开发人员都拥有完整的 Git 权限。

我们希望使用以下流程:

  1. 每个开发人员都使用 Aptana 作为 IDE 来处理自己的项目版本。
  2. 每个开发人员都会定期从存储库获取更新并提交给存储库。
  3. 我们定期更新来自存储库的项目演示版本,以向项目利益相关者展示。

所有这些都是非常标准的东西,但我们正在努力寻找一些清晰的文档或“如何”来设置它。 Github 文档似乎是针对开源协作的。

可能我们没有完全理解 Git 术语,我们有 Subversion 背景,并且一位开发人员使用过 Mercurial。

有人可以建议一些清晰的文档或此类设置的操作方法吗?

提前致谢。

We have a small development team, all working in the same room. We're setting up Github to manage a number of medium/ large projects. We are all new to Github but want to use it as our projects are based on open source software hosted on Github.

With our situation the "shared repository model" looks ideal - where each developer has full Git privileges.

We'd like to use the following process:

  1. Each developer works with their own version of the project using Aptana as an IDE.
  2. Each developer regularly gets updates from, and commits to the repo
  3. We regularly update a demo version of the project sourced from the repo to show to project stakeholders.

All of this is pretty standard stuff but we're struggling to find some clear documentation or a "how to" for setting this up. The Github documentation seems to be aimed at open source collaboration.

It may be we don't fully understand the Git terminology, we come from a background of Subversion and one dev has used Mercurial.

Can someone please suggest some clear documentation or a how-to for a setup of this type.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

千紇 2024-12-13 14:04:48

首先,在您的存储库上创建几个分支,例如:

  • master - 这是代表​​您当前版本的分支
  • 。development - 这是保存最新完成的开发任务(即用户故事)的分支。

当开发人员开始处理新的用户故事时,他会创建一个新的分支来自开发的分支使用:

git fetch
git checkout develop
(git pull origin develop) <-- only if you are not yet on head of develop
git checkout -b new-feature-branch

现在开发人员仅在该功能分支上工作。完成工作后,他从其功能分支创建了一个用于开发的拉取请求。其他开发人员会在 GitHub 上查看它,审查他的更改。如果需要返工,开发人员会继续将更改推送到其功能分支,因为拉取请求将随之更新。如果一切正常,拉取请求将合并到开发中。

有时,您再次使用拉取请求将更改从开发合并到主控。如果您没有良好的测试覆盖率和持续集成,您可能需要在master和develop之间添加一个额外的分支来首先稳定您的代码。

该模型假设您的功能分支寿命很短,例如 1-2 天。

First, create several branches on your repo like:

  • master - that's the one representing your current release
  • develop - that's the one holding the latest completed dev tasks (i.e. user stories)

When a developer starts working on a new user story, he creates a new branch from develop using:

git fetch
git checkout develop
(git pull origin develop) <-- only if you are not yet on head of develop
git checkout -b new-feature-branch

Now the dev only works on this feature branch. After completing his work, he creates a pull request from his feature branch towards develop. Other devs will take a look at it on GitHub, review his changes. If rework is required, the dev continues pushing changes to his feature branch, because the pull request will be updated along with it. If everything is fine, the pull request is merged into develop.

From time-to-time, you merge your changes from develop to master, again using pull requests. If you have no good test coverage and continuous integration, you might need an additional branch between master and develop to first stabilise your code.

This model assumes that your feature branches are short lived, e.g. 1-2 days.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文