From the course: Visual Studio: Source Control with Git and GitHub

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Undo changes

Undo changes - Visual Studio Tutorial

From the course: Visual Studio: Source Control with Git and GitHub

Start my 1-month free trial

Undo changes

- [Narrator] In this video, I want to look at the Undo feature in Visual Studio, which makes it easy to undo changes to your working tree. So right now, I'm in PowerShell, and I've run git status and I see that I've got nothing to commit, working tree is clean. So let's change that. Over in Visual Studio, I'll modify this one file here, this countries.txt file. I'll make a trivial change here, change the name of this country, and then save my changes. Visual Studio tells me there's a pending edit with the red check mark. Over in PowerShell, when I run git status, I now see that I've got this modified file. And of course I need to commit that to save the changes. Now I realized that I really didn't want to make that change. So how do I undo that action? In Visual Studio, with this simple trivial change, I could just do a Control + Z to undo that change. And then I still have the red check mark here because it's…

Contents