larsks / blog.oddbit.com

3 stars 0 forks source link

post/2019-06-17-avoid-rebase-hell-squashing-wi/ #4

Open utterances-bot opened 5 years ago

utterances-bot commented 5 years ago

Avoid rebase hell: squashing without rebasing · The Odd Bit

You’re working on a pull request. You’ve been working on a pull request for a while, and due to lack of sleep or inebriation you’ve been merging changes into your feature branch rather than rebasing. You now have a pull request that looks like this (I’ve marked merge commits with the text [merge]): 7e181479 Adds methods for widget sales 0487162 [merge] Merge remote-tracking branch 'origin/master' into my_feature 76ee81c [merge] Merge branch 'my_feature' of https://github.

https://blog.oddbit.com/post/2019-06-17-avoid-rebase-hell-squashing-wi/

SahilTikale commented 5 years ago

Thank you. The first option worked like charm.

ipepe commented 4 years ago

Good content! Definitely gonna check out more posts on Your blog.

Also today I learned about https://utteranc.es/ that is really cool!

jen2 commented 4 years ago

This is fantastic! It saved me from spending hours in interactive rebase hell. Going to share with my team! Thank you!

larsks commented 4 years ago

Glad you found it useful! :)

merishas commented 4 years ago

I created an account just to say thank you sooooooooooooooo much for the second option. It worked like a charm.

mickeyperlstein commented 4 years ago

Maybe the best rebase hell solution I have eve used. works every time and no mess as long as you are the only dev working on the branch, its gold

tzaffi commented 4 years ago

Well done Lars!!! This really solved my problem. I also "plagiarized" your approach for this Stack Overflow question

pscheit-lillydoo commented 4 years ago

nice but there is a small typo:

At this point, you work branch should be identical to the original my_feature branch (running git diff master should not show any changes)

should be

At this point, you work branch should be identical to the original my_feature branch (running git diff my_feature should not show any changes)
larsks commented 4 years ago

@pscheit-lillydoo Thanks! There is also another typo there, it's you -> your. I've fixed both!

davidelbe commented 3 years ago

Thanks for this. Really helpful for a commit tree that diverged in ways I couldn't understand.

larsks commented 3 years ago

It looks like someone has taken this post and made it useful 😃

jimmzzz commented 3 years ago

Great article!

sdomi003 commented 2 years ago

so much better than replaying commits in interactive rebase

dudeNumber4 commented 2 years ago

FYI: windows powershell won't run commit-tree, not sure which characters hose it up.

OnlyTarg commented 2 years ago

Thanks a lot!

rorybot commented 1 year ago

Just wanted to add, this was wonderfully helpful. Thank you.

roryfahy commented 1 year ago

Thanks for this from the future

KurtGokhan commented 1 year ago

Thanks for this. I created a function for the 1st method here: https://gist.github.com/KurtGokhan/d1fd49cac394276be53769b0dfb20795

iainelder commented 10 months ago

Option 1 is what autosquash should have been! Thanks for sharing the clean-push project too, and @KurtGokhan thanks for sharing your Bash code.

saltzman007 commented 7 months ago

Gr8!!