Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In layman terms: rebase wipes out your commits and replaces them with new ones. Notice how the hashes change when you do a `git rebase master`, it's not just re-ordering them. If those commits have been published or pulled from someone else, you are destroying history.


Ok, thanks to you and dan00.

I realize it has never been a problem for me because commits replayed when I rebase are always isolated in my feature branch and not pushed anywhere.

I suppose it would be a problem if I rebased from two different branches that were already public.

Also, I often work with "dependent branch". When a change has to be made that does not fit the feature branch "theme", I create a new feature branch from master, make my change, make a PR to master and rebase the dependent branch in the feature branch. It seems it does not cause any history overwrite too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: