Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I always wanted to know what rebase did. But I know I won’t google it anytime soon. Mind giving a quick summary of it? I’ll at least read your response!
-
purist11838yI hope i wont get crucified for getting it wrong.. But anyway.. assume a branch with commits A and B. At this point let us branch out to another branch . So now both branches have A and B.. Now you commit C and D in the 2nd branch..But in the meantime..Some over enthusiastic guy has commited 10 times on the main branch.. So to include those 10 commits in your branch you can use rebase.. rebase is basically what it means literally.. It changes the base of the branch from B to B+10 ..after which your commits C and D will appear.. -
purist11838yrebase also does many things in interactive mode.. It can also be used to copy any range of commits from a branch to another. in interactive mode , you can squash..fixup..edit commits..
That being said, rebase is a dangerous command in a shared repo as it destroys the original tree..
Related Rants

The more i use git.. more the fun it is.. Just found out the usage of rebase and cherry-pick.. I have read about the implications of these commands in a shared repo.. But it is fun to use it in a solo repo..
rant
git
rebase