by rahkiin · 8y ago · 0 comments
Merging does create a merge commit which is sometimes annoying (when you are merging a single-line commit, for example). It does however preserve full history.
Frequently, I see a commit history like:
Implemented feature
Forgot semi-colon
Fixed syntax error
Addressing review comments
Removed unnecessary method
History like that, other than the initial commit, is not very useful. It makes more sense to rebase to clean up the commit history such that it becomes a logical series of commits, which can then be viewed via git log or git blame.If the push fails because the master has changed during the few minutes you spent in rebasing, just rebase again on the most current master and push again. No force-push is required.