git: push a single commit

后端 未结 4 765
一整个雨季
一整个雨季 2020-12-02 22:33

Say I made several commits and wish to cherry pick which ones I push to the remote repository. How can I do that (in ascii: C1->C2->C3->C4 and I want to push C2 and C4). Wil

4条回答
  •  隐瞒了意图╮
    2020-12-02 22:51

    If you have your commits on a private branch, you can cherry pick commits from the private branch and apply them to the official branch. At this point you can now push all your commits on the official branch (which is the subset that you previously cherry picked).

提交回复
热议问题