From the course: Source Code Control in .NET with Git Using SourceTree

Unlock the full course today

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

Reversing the commit

Reversing the commit

From the course: Source Code Control in .NET with Git Using SourceTree

Start my 1-month free trial

Reversing the commit

- [Instructor] You'll remember that we pointed out that we had run into some trouble and had to reverse out a commit. And that's why you see some of this over here. Let's look at this in a little bit more detail because interestingly, you reverse a commit with another commit. There are two reasons for that. One is, it gives a running audit of everything that happened and secondly, it's much safer because you can always go back to one of the earlier commits and branch from there, as we'll see in a while. In order to recreate this problem, let's go back to our code and have User One make yet another small change. So we'll say once more, Console.WriteLine and we'll say, "this is yet another change by User One". We're going to save that and then we're going to commit it. So let's go to SourceTree for User One. Notice that we have uncommitted changes, that's the change we just made, we can see that. We're going to stage it. We've seen this quite a few times. We're going to commit it and…

Contents