Git rebase rewrites commit history by cutting commits from one branch and applying them to another branch, changing the commit IDs. This cleans up history but can cause issues if commits are pushed. Git merge keeps the original commits and adds a merge commit, keeping full history but potentially cluttering it. Rebase is best for local branches before pushing, while merge is better for integrating public branches to avoid rewriting shared history.