From the course: Git Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Create a file and stage it

Create a file and stage it

- [Barbara] So as to see how this works, we're going to start off by creating a file and staging it. I'm going to use Visual Studio Code because it's consistent among all operating systems, so you will always have the same experience, but if you want to, you can create the files with whatever tools you have available on your operating system. I'm going to create an example file here. I'll right click and choose New File. I'm going to create a file called example.txt. Note that it doesn't matter what kind of file I'm creating, I could also create code in here. I add some content and I click Control + S to save this file. I can now add this file to the staging area to make sure that Git understands that I want to save this file in the next commit. So I'll use Git add and then the name of the file it now has been added to the staging area. Note that in this case, I could also have used Git add .. If I use that and I make…

Contents