I have been using git for years now and honestly, I really don't quite understand how certain codes work like for in this case git pull --rebase
. Can someone explain to me how rebase works like I'm five?
Thanks and you're awesome!
I have been using git for years now and honestly, I really don't quite understand how certain codes work like for in this case git pull --rebase
. Can someone explain to me how rebase works like I'm five?
Thanks and you're awesome!
For further actions, you may consider blocking this person and/or reporting abuse
My job is to get you to join DEV, so if you fancy doing me a favor, Iβd love for you to create an account.
Β
If you found DEV from searching around, here are a couple of our most popular articles on DEV:
Ridhi Singla -
Maxime ChΓ©ramy -
Thomas Bnt -
Maxime Guilbert -
Once suspended, iamjoross will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, iamjoross will be able to comment and publish posts again.
Once unpublished, all posts by iamjoross will become hidden and only accessible to themselves.
If iamjoross is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to Jose Ross Barredo.
They can still re-publish the post if they are not suspended.
Thanks for keeping DEV Community π©βπ»π¨βπ» safe. Here is what you can do to flag iamjoross:
Unflagging iamjoross will restore default visibility to their posts.
Top comments (4)
As a 5y old you started alone to build a Wood Wagon specifically for the mars Planet Atmosphere & gravity.
You put aside the wagon after you finish it, because your parents tels you we haven't colonize Mars yet.
After 35 yrs, the wagon is rotten, cannot be used, but you won a ticket to Mars and wait it so bad.
You find this Time Machine and hit the "rebase" button, while whispering "I wish I could bring my Mars Wood Wagon here & now". And Voila!
The Wagon is moved trough the history, and magically rebuilt in front of you. You get your wooden wagon here and now, you pack it and go on Mars with it. The Wagon building steps were erased from the history and you remember as you were building it today, not 35yrs ago.
Now ... I said alone, because if when you were 5y and built the Wagon, one of your friends have helped you, now ... when you moved it trough the history ... something really bad would happen. He will have memories of a thing that didn't existed.
Rebase, like a Time Machine is very powerful, should not be used lightly.
Disclaimer: I recommend NOT to use rebase for many reasons, try git merge --squash if you want this effect, but the history should remain as it was, not as we want, we should learn from history.
Wood Wagon - your commits on an old branch, put on hold while others developed the master. You want to bring the branch in a newer master.
5y Kid - you as developer
World - the repository
Time - commit order (A-B-C-D) in git history log
Friend - developer who helped you on that branch, and want to continue. You have to rebase --force your timeline into his, erase his memories too.
explained beautifully, thanks a lot!
Take a closer look at git rebase.
dev.to/theodesp/explain-git-rebase...