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
From the course: Git Essential Training
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
-
-
-
-
-
-
Set up a remote repository2m 30s
-
(Locked)
Clone the remote repository1m 21s
-
(Locked)
Create a file and stage it1m 27s
-
(Locked)
Commit a file1m 8s
-
(Locked)
Push the file to the remote repository57s
-
(Locked)
The .git folder1m 37s
-
(Locked)
Initialize a repository locally and sync it to the remote repository2m 33s
-
(Locked)
Challenge: Push your first code41s
-
(Locked)
Solution: Push your first code40s
-
-
-
-