2024-10-11 14:18:16 +02:00
|
|
|
# About interactive rebases
|
2024-10-11 14:34:30 +02:00
|
|
|
|
|
|
|
Interactive rebases provide a manual way of rewriting the
|
2024-10-11 14:47:12 +02:00
|
|
|
history of your repository. The changes associated to the
|
|
|
|
commits specified in your rebase range are reapplied
|
|
|
|
at the top of the given base target. During an interactive
|
|
|
|
rebase, you can intervene in this process and rearrange
|
|
|
|
the order; drop some commits; modify commit messages and
|
|
|
|
file changes; squash some commits together -- or split
|
|
|
|
them apart.
|
2024-10-11 14:47:33 +02:00
|
|
|
|
|
|
|
This is one way to remove secrets that should never have been
|
|
|
|
added to the repository from the history again. Note that
|
|
|
|
if a remote is involved, this involves a forced push of
|
|
|
|
the rewritten branch (plus pruning / garbage collecting
|
|
|
|
on the server end, if you _really_ want it gone). In
|
|
|
|
addition, everyone with local copies of the repository
|
|
|
|
needs to replace their version with the one with the
|
|
|
|
rewritten history... a long and tedious process.
|
|
|
|
|
|
|
|
But, in any case, we are here to learn!
|