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 - Visual Studio Tutorial
From the course: Visual Studio: Source Control with Git and GitHub
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
-
-
-
-
-
-
-
-
(Locked)
Change the PowerShell command prompt1m 19s
-
(Locked)
Show the Git help files from the command prompt1m 24s
-
Commit to local: VS2m 52s
-
(Locked)
Push to remote: VS1m 16s
-
(Locked)
Commit and push: VS1m 16s
-
(Locked)
Undo changes3m 6s
-
(Locked)
Show history with Git log: PowerShell2m 19s
-
(Locked)
Show history in Team Explorer1m 53s
-
(Locked)
Compare differences: VS2m 21s
-
(Locked)
When to use revert or reset3m 3s
-
(Locked)
Rollback to prior commit with revert55s
-
(Locked)
Rollback a local repo with reset1m 46s
-
(Locked)
-
-
-
-
-