From the course: AI Coding Agents with GitHub Copilot and Cursor

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Reverting agent edits

Reverting agent edits

- [Speaker] As you start working with these AI coding agents, they will make a lot of mistakes or for post-code that looks sound at the time, but turns out to not work exactly as you intend to. And you'll often find yourself accepting edits only to realize, "No, I shouldn't have accepted that. I need to revert back." The good news is both GitHub copilot and cursor provide rollback for the agent feature. So if the agent did something and you don't like it, you can always revert back to a previous state, and this works very much like Git would revert back to an earlier state. So here in GitHub copilot, I made a small change. I asked the agent to add a difficulty setting from one to five that reveals or hides letters, and I've accepted these changes. Now that I look at it, I realize, "No, I want to do it a different way." And if that's the case, I can scroll back up to where I made my request and click on this X here in the top corner. When I hover over it, it tells you what it does…

Contents