{"slug": "undo-ai-commits-with-git-reset-or-git-revert", "title": "Undo AI commits with git reset or git revert", "summary": "A developer tutorial advises using `git reset` to undo uncommitted AI-generated commits and `git revert` for pushed ones, emphasizing that developers must know how to reverse AI-written code. The guidance follows a scenario where an AI assistant made five commits, one of which broke the project.", "body_md": "Your AI assistant made five commits and one broke everything. Don’t panic.\n\nIf nothing is pushed, `git reset`\n\nback to the last good commit. If things are already pushed, use `git revert`\n\non the bad one so the history stays clean for everyone.\n\nAI can write the code, but you still need to know how to undo it.\n\nWant the full walkthrough? Watch the full video: [Undo anything in Git](https://jtemporal.com/undo-anything-in-git-reset-vs-revert/)\n\nFollow for the git your AI can’t do for you!", "url": "https://wpnews.pro/news/undo-ai-commits-with-git-reset-or-git-revert", "canonical_source": "https://jtemporal.com/git-undo-ai-commits-short/", "published_at": "2026-08-13 03:00:00+00:00", "updated_at": "2026-08-31 14:26:10.176491+00:00", "lang": "en", "topics": ["developer-tools"], "entities": [], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/undo-ai-commits-with-git-reset-or-git-revert", "markdown": "https://wpnews.pro/news/undo-ai-commits-with-git-reset-or-git-revert.md", "text": "https://wpnews.pro/news/undo-ai-commits-with-git-reset-or-git-revert.txt", "jsonld": "https://wpnews.pro/news/undo-ai-commits-with-git-reset-or-git-revert.jsonld"}}