4 ms·
If your merge goes wrong, you should rip it out of your feature branch. You use git rebase -i for that, or git reset even. But you shouldn't merge into your fe
by exceptione 2y ago
If your merge goes wrong, you should rip it out of your feature branch. You use git rebase -i for that, or git reset even.
But you shouldn't merge into your feature branch at all. We are interested in how your commits change what becomes before it in mainline. We are not interested in how main differed from your feature branch at various points in time.
Git rebase is wonderful for people that create mess when working. Your feature branch can contain lots of WIPs for all the times you hit five 'o clock. With interactive rebase you can clean up your mess: squash, split, delete and reorder commits. You can do this all graphically even, like drag-drop reordering of commits. Also read up about git fixup and friends for quick fixes. There is also git rebase abort if you think you are doing something wrong.