Deleting a commit in Between other commits

后端 未结 2 820
情书的邮戳
情书的邮戳 2020-12-19 15:24

I have a local and its corresponding github repo. I have some commits as

A <- B <- C <- D

A being the latest.

This is situ

2条回答
  •  离开以前
    2020-12-19 15:33

    1. Ensure you back up your .git folder.
    2. Ensure commit D , don’t rely upon the changes made in C.
    3. git rebase --onto D B~1 (as A is the latest commit)

提交回复
热议问题