git: push a single commit

后端 未结 4 761
一整个雨季
一整个雨季 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条回答
  •  萌比男神i
    2020-12-02 22:41

    IIRC, due to how git considers commits to work, C4 inherently includes C3, so the concept of "pushing C4 but not C3" doesn't make sense to git (and likewise C2 relative to C1). (See the answer to this previous question.)

提交回复
热议问题