Git jippermettilek tiktib mill-ġdid il-istorja — emendam, rebasing, squashing, jew inqas commits — biex tnaddaf commits jew issolvi problemi. Huwa qawwi imma għandu jsir b'attenzjoni: tiktib mill-ġdid ta'istorja shared jikkawża problemi serjosi, għalhekk ir-regoli bih huma kritiki.
Modi biex tiktib mill-ġdid il-istorja
git commit --amend → modify the most recent commit (message or content)
git rebase -i → squash, reword, reorder, edit, drop commits (interactive)
git rebase <branch> → replay commits onto another base (linear history)
git reset → move the branch pointer (discard/uncommit)
git filter-repo → rewrite MANY commits (remove a file/secret from all history)
→ All of these change commit HASHES (rewriting = creating new, different commits).
