From the course: Working with LinkedIn Learning Exercise Files on GitHub

Roll back local branch changes with Restore - GitHub Tutorial

From the course: Working with LinkedIn Learning Exercise Files on GitHub

Roll back local branch changes with Restore

- [Instructor] Here's another technique for dealing with modified files. So I'll go into this file. This is the robot.cs file and I'll modify this string again, save the changes switch to my terminal and call it, get status. This is the same message as we saw earlier in another video. And I can't switch branches till I handle this change. Now, what we're looking at in here is called restore. Think of this as undo. I'm going to restore to discard the changes in the working directory. So it's easy you call get restore. And then in this case, there's one file that's changed. So I'll just use the name of that file, like this. I don't see any results in the screen, but if I call it get status again, let's say that my branch is up to date. There's nothing to commit over here in notepad. I see that the file has been modified by another program. I say yes. And I see that I've undone the changes to that file.

Contents