Start learning with our library of video tutorials taught by experts. Get started
Viewed by members. in countries. members currently watching.
The course shows how to use Git, the popular open-source version control software, to manage changes to source code and text files. Using a step-by-step approach, author Kevin Skoglund presents the commands that enable efficient code management and reveals the fundamental concepts behind version control systems and the Git architecture. Discover how to track changes to files in a repository, review previous edits, and compare versions of a file; create branches to test new ideas without altering the main project; and merge those changes into the project if they work out. The course begins by demonstrating version control in a single-user, standalone context, before exploring how remote repositories allow users to collaborate on projects effectively.
Now that we have initialized our project, we are ready to make our first commit that is to tell Git to track the first change. So we need to do something to our project, to make a change so that it can track it. So what we are going to do to start with is create a new file. So I am going to do that using TextMate, you can use any text editor--again that's a basic text editor, not a word processor to do this. So I'll open up TextMate, and I am just going to create a new file, I am going to say, This is my first file, and then I am going to choose Save, and then I'll just call it first_file.txt, and I'll just put it on the Desktop for now. All right.
So now I've got this first file, I am going to move it in my project, so there it is. Now I have made a change to my project, I have added a file, that's the change that's been made. So now what I want to do is switch over to the command line and tell Git to add all changes that have been made to this entire project, everything that's been made, and I do that with the dot, dot is short for, this directory. I am already inside my project directory first_git_project, so git add every change that's been made inside this directory, and now, I am going to commit that change, tell Git to put it in permanent memory, to put it in the repository. So git commit, and then I am going to give it a message, -m and in quotes I am going to put "Initial commit".
Now I could put something more specific in there, but this is going to be good enough to get us started, this is just a simple message telling it that it's going to make this commit, and you can see that it did one file change, one insertion, create mode, first_file, so now it has added that to our project. Now we have just tracked our first change in Git. So this is the basic process that we are going to follow throughout working with Git. It's really quite simple, you just make your changes, then you add the changes, and then you commit the changes to the repository with a message, and that's it. That's really the basic cycle that we are going to be following, make changes, add the changes, commit the changes.
Now of course, there is a lot more going on with each one of these steps and a lot of options and other things that we can do, but this is the basic flow of making commits that we are going to be doing over and over and over.
Find answers to the most frequently asked questions about Git Essential Training.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.