0

I am new to managing code revisions and need guidance on how to merge to code sets. I have a MASTER branch with my latest UI and I have a branch called "Feature-A" with lots of Django additions + template additions to the previous UI files.

Since I am new to Github, I want to take the safest approach incase I need to revert mistakes. Should I make a new brach of master and merge Feature-A into that branch or should I merge Feature-A directly into the MASTER?

4

1 回答 1

0

由于您是新手,我想说最好的方法是创建另一个分支(主分支的克隆),然后将功能 A 合并到其中,看看它是否有效。如果不是,请继续测试功能 A 以使其兼容。如果它有效,那就太好了!只需删除那个额外的分支并将功能 A 合并到 master 中。

即,
git checkout master
然后,创建一个新分支 ( git checkout -b 'featuretest')
现在,git branch显示
* master
* featureA
* featuretest

然后,做git checkout featuretestgit merge featureA合并它。

如果该功能有效,那就太好了!删除分支 ( git checkout master; git branch -d featuretest) 并真正做到 ( git merge featureA)

如果该功能不起作用,请返回功能分支 ( git checkout feature) 并继续测试。

于 2014-09-24T03:50:55.260 回答