Git உங்களை வரலாற்றை மீண்டும் எழுத அனுமதிக்கிறது — commits களை திருத்துதல், rebasing, squashing, அல்லது நீக்குதல் — 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).
