Git საშუალებას გაძლევთ გადაიწეროთ ისტორია — შეასწოროთ, გადაფუძნოთ, დაკუმულოთ ან წაშალოთ commits — ისტორიის გასასუფთავებლად ან პრობლემების გამოსასწორებლად. ეს ძლიერია, მაგრამ ფრთხილად უნდა გაკეთდეს: გაზიარებული ისტორიის გადაწერა სერიოზულ პრობლემებს იწვევს, ამიტომ ამის გარშემო არსებული წესები კრიტიკულია.
ისტორიის გადაწერის მეთოდები
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).
