Git rebase destroys the context of the commit, leaving basically a diff apply instead of the much more contextually rich merge commit. This doesn't show up on a smaller repo, but if you have a busy repo, with lots of contributers, untangling a mess becomes much harder if you no longer have the true parentage of a given commit. The problem with rebase is that it corrupts the true history of the commits. Rebasing local history is OK (it's more than OK, it's sometimes necessary to maintain a clean history), but changing other people commits history is considered a bad practice. I DO NOT encourage rebasing remote (public or shared) branches. NOTE: Because of many discussions about this note. To get to the next batch of conflicts (if you have any). If you want to merge a feature branch it might be wiser to actually merge your commits thus having a single point of integration of two distinct branches.Īlso the conflict resolving will be now per commit basis, not everything-at-once, so you will have to use git rebase -continue The command will apply all your yet-to-be-pushed commits on top of the remote tree commits allowing your commits to be straight in a row and without branches (easier git bisects, yay!).įew notes though. To keep the repository clean, your commits always on top of the tree until you push them to a remote server. You actually issuing git fetch + git merge commands, which will result with an extra commit and ugly merge bubbles in your commit log (check out gitk to see them). What you might not know is that by typing git pull When working on a project you usually synchronize your code by pulling it several times a day.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |