search

Home  >  Q&A  >  body text

git如何将当前修改提交到不同的分支

有多个git分支,当前修改的代码不同分支都需要做相同的操作,如何一次修改提交到不同的分支呢?比如:有branch1和branch2 ,在branch1 修改代码,如何同时提交到branch1和branch2

曾经蜡笔没有小新曾经蜡笔没有小新2792 days ago581

reply all(3)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-02 09:23:49

    Submit on the current branch1, then cherry-pick to branch2..

    reply
    0
  • 滿天的星座

    滿天的星座2017-05-02 09:23:49

    git push origin 本地分支:远程分支
    For example: git push origin dev:dev git push origin dev:master

    reply
    0
  • 为情所困

    为情所困2017-05-02 09:23:49

    Unless other branches are the same as the current branch, they need to be merged ~ There is no one-time decision

    reply
    0
  • Cancelreply