2

I'm looking to progress a move from SVN to Git at the company I work for. The issue I'm having is getting my head around a decent workflow.

Typically for a PHP project in a post-launch state, the client would create a ticket for some work with an ID (smeg23452). In SVN, we would typically put the ticket ID in each commit on the develop branch and then cherry pick those changes and put them into the trunk. It's okay, but there have been times where merges have failed or developers have failed to put ticket numbers against work.

In an ideal world, I would like to be able to have a branch in Git for the ticket (e.g. smeg23452), merge smeg23452 into develop when changes have been completed and then merge smeg23452 into staging which will be tested, staging will be merged to master ready for deployment live (not merge develop to master, which seems to be common practice). A client may typically create 5 tickets, want to see them in the develop environment online and then pick only 3 of those tickets to go live which is why I need to be able to keep them far away from other environments.

Have I got it all wrong?

4

2 回答 2

1

我指的是“与测试/质量保证流程集成的 Git 分支策略”作为集成流程。
我指出git revert要快速排除暂时不能进入 prod 的功能。

OP MrNorm问道:

在这种情况下会起作用吗?

http://cl.ly/image/3w1c0F0k0l0U

分支si001并且si003在开发(客户端可见环境)中正常并且已被要求上线,但si002需要上线。
由于我们有 2 次合并要开发,我们是否需要一一还原,然后才能将开发合并到 master

您只会恢复合并提交“将分支'feature/si002'合并到开发中”。

于 2013-10-01T09:36:13.310 回答
0

看看 git 流。Git flow 是一种分支策略,它还附带一些漂亮的命令来帮助你。

http://nvie.com/posts/a-successful-git-branching-model/

于 2013-09-30T11:42:00.353 回答