If you are at all confused about git rebasing (like basically everyone else ever), this guide is really helpful. It explains what rebasing actually does, why you would want to do it, how to do it, and most importantly, when not to do it.