[英]Git workflow when working on part of a source tree with a remote server
I have a project which contains different components that everyone works on. 我有一个项目,其中包含每个人都在从事的不同组件。 We have a server-side component, and N amount of client components that interact with the server.
我们有一个服务器端组件,和N个与服务器交互的客户端组件。 I myself am responsible for one of the client components.
我自己负责客户端组件之一。
I'm at a point where I'd like to branch off to develop new features for the client. 我现在想分支为客户开发新功能。 The problem here is that while I'm updating the client, I'd like to do the following:
这里的问题是,当我更新客户端时,我想执行以下操作:
a) Make sure all server-side updates that are being made by colleagues make their way to my experimental branch. a)确保同事所做的所有服务器端更新都可以进入我的实验分支。 b) Push my experimental branch to a shared repo so folks can see the work I've been doing.
b)将我的实验分支推送到共享存储库,以便人们可以看到我正在做的工作。 c) Merge back into master branch when features are done.
c)完成功能后,合并回master分支。
What's the best strategy for this particular workflow when working with a shared repo? 使用共享存储库时,此特定工作流程的最佳策略是什么?
Thanks for your solution(s). 感谢您的解决方案。
The standard workflow works like that: 标准工作流程如下:
git clone
to create your local repository. git clone
创建您的本地存储库。 origin/master
. origin/master
的跟踪分支。 Now to fulfill: 现在实现:
git merge
or git rebase
to import the changes of other people to your branch. git merge
或git rebase
将其他人的更改导入分支。 git push
to send your branch on the shared repository. git push
在共享存储库上发送分支。 This is the simplest way of doing things. 这是最简单的做事方式。
You may also use private/public repository for everyone. 您也可以为所有人使用私有/公共存储库。 Look at some workflow proposal for Git.
查看有关Git的一些工作流程建议。 In this case, you get rid of the pushing and only use
pull/merge
. 在这种情况下,您无需使用推入功能,而只能使用
pull/merge
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.