-
First, let's find out how many commits need to be merged.🐐
how many changes
I have 2 commits. Now I want to rewrite history from HEAD~2, that is, from what was 2 commits ago. To do this, I do this:
a text editor opens automatically. Here's a list of my commits and a big comment on what I can do. From the list of commands, you can see that we can use squash or fixup in order to glue commits. The first comes in handy when you want to change the commit message, and the second when you want to use the commit message of the first. So, to glue all the commits, I do like this:
before after remember delete cannot be restored |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Or you can just do "git rebase -i develop" and it will show all commits that are not on develop branch 😃 Also, to note that after rebase and force push other users cannot pull your new changes if they had cloned your branch. They have to delete their local branch and fetch it again. |
Beta Was this translation helpful? Give feedback.
Or you can just do "git rebase -i develop" and it will show all commits that are not on develop branch 😃
Also, to note that after rebase and force push other users cannot pull your new changes if they had cloned your branch. They have to delete their local branch and fetch it again.