can i rebase old commits?

后端 未结 2 780
故里飘歌
故里飘歌 2021-02-19 07:02

I have just started using git. Rebase is great stuff. I should have used it in a specific earlier case.

is there a perfectly acceptable way to rebase old commits for th

2条回答
  •  攒了一身酷
    2021-02-19 07:47

    You should positively only do this for commits that have not been pushed upstream. That said, I find it easiest to use git rebase -i where is the id of a commit that is at least as old as the newest one you do not want to mess with. When your editor pops up, it will contain instructions about how to squash and/or delete commits.

提交回复
热议问题