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

Unlock the full course today

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

Adding the staging area

Adding the staging area

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

Start my 1-month free trial

Adding the staging area

- [Instructor] Until now, we've been doing automatic staging; but it's very beneficial to have unstaged and staged files. And let me give you an example of that, rather than trying to explain it in the abstract. Let's add one more line to our hello world program; and we'll say in that new line, this is line three. And once we have that set up, we can save the file and return to SourceTree. Here's our uncommitted changes, and now I've set it up to have staged files and unstaged files. The way that you do that is to go to the Actions menu and the first time you want to have that set up, choose Add to Index. That will create this staged and unstaged area. The staged area is also called the index. The idea here is that if you have multiple files, you can choose which of those to stage; and from the staged area, you can make your commit. Since I have only one file, I'm going to add that to the staged area and now do my commit. And as we go along, you'll see that that separation of unstaged…

Contents