2 ms·
Rebasing is re-applying a sequence of commits to a different parent. I like using explain git with D3 to show how things work - https://onlywei.github.io/expla
by shagie 4y ago
Rebasing is re-applying a sequence of commits to a different parent.
I like using explain git with D3 to show how things work - https://onlywei.github.io/explain-git-with-d3/#rebase https://onlywei.github.io/explain-git-with-d3/#rebase
Compare that with merge - https://onlywei.github.io/explain-git-with-d3/#merge https://onlywei.github.io/explain-git-with-d3/#merge
At the end, the HEAD has the same content, but the structure of the graph is different.
Note that rebase falls in the set of "rewriting history" operations in git and so pay attention to the caveat in the explanation:
> For this reason, you never want to rebase commits that have already been shared with the team you are working with.
Rebase and reset are two of the commands that need to be done with caution and full awareness if working with commits that have been shared with other people.