开发者

Is it possible to apply a commit to all branches in git?

I have a feeling I am asking something that can't be done in git, but I might as well ask. Is there any way that I can make one change and commit it to all branches? For instance, suppose I开发者_运维知识库 want to make a change to my AUTHORS file or LICENSE file. I know I can commit the change to one branch and then cherry-pick it to each branch individually. But is there an easier way to do it?


If the branches are going to be merged back to the trunk, or rebased on top of the trunk, you won't have to worry about it. They'll pick it up when that happens.

If they're long-lived branches, you'll want to either merge the updated branch into them, or cherry-pick the commit.


What can help you are Topic Branches. Read this and this blog post.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜