From the course: Git Essential Training (2023)
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Commit a file
From the course: Git Essential Training (2023)
Commit a file
- [Instructor] In the last video we added a file to the staging area. If we are not sure if there are files in that area we can always check with git status. (keyboard clicks) And we see that there is a change to be committed. The new file is example.txt. Let's commit this file locally. I will say, "git commit -m". And now I can fill out a message so I can tell whoever is viewing this history why I made a commit here or what I added. In this case, I will say, "adds example.txt". I'll press enter and my file is now committed. This means that locally a snapshot has been created of the state of this file. If I add git status now, (keyboard clicks) it will say that everything's committed, but we're still ahead of the branch on the remote repository. In the next video we will push that file to the remote repository.
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
-
-
-
-