Git Rebase Lesson

I wrote a script to automate the creation of two divergent git branches…’main’ and ‘feature’.

When I rebased ‘feature’ onto ‘main’ worked was “saved”.

The following code:

git checkout feature
git rebase main -i

even show ‘noop’ in the text editor.

Turns out, my code was creating duplicate patches on each divergent branch (here’s how to reproduce it if your interested, github link)

So when I rebased, git skips “already introduced patches”.

My reaction after 2 hours of reaching this finding:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: