git 为某次提交新建分支(只合并某次提交到一个分支上)
仅有的幸福
仅有的幸福 2017-05-02 09:21:05
0
2
729

情况是这样的。我在develop分支上提交了一个更改,但是我想把这个更改同时合并到master分支上。我又不想把整个develop分支都合并上master上面。我用的sourcetree,该怎么操作?
正确的做法我知道应该新建一个hotfix。然后同时推到dev和master。

仅有的幸福
仅有的幸福

reply all(2)
phpcn_u1582
shellgit checkout master
git cherry-pick commit-id1 commit-id2  // 把指定commit合并到当前分支

Sourcetree has not been used before, you can try to click on it遴选 (Probably the translation of cherry-pick...)

左手右手慢动作
php//用命令行
git checkout master
git checkout develop test.txt//develop分支下的test.txt
git commit -am "a commit"
git push origin master

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!