![]() Then, initialize a repository following the example of “FirstProject” in the previous chapter. We’ll be using standard unix-style paths (without the drive letter) throughout the course so if you’re using Windows and GitBash then please remember that you’ll see the path starting with the drive letter, e.g. then you’re in the right place! If not, don’t worry you just need to use the command “cd” to get back to the Git folder/repository for the project. If you’ve created the same files as me, and the result of the command “pwd” is similar to: Users/JohnDoe/Documents/FirstProject/ To make sure you’re in the right place, enter the command “pwd” in Git Bash. Initialize a Repository Go to Your Git Repositoryįirst of all, you need to go to the Git repository for the project. You’re going to implement a basic web project with an HTML file and a CSS file to put all of this into practice. Once the files have been staged, you can create a new version of your project. To start, send the modified files (file1 and file2) from the working directory to the stage. These three areas are on your computer, at the local level.Īt the bottom of the diagram, you can see the GitHub repository-your remote repository. When you create new versions of a project (remember the three different versions of the cake?), they are stored in this area. It houses all the modified files you want to see included in the next version of your code. This area is an intermediary between the working directory and the repository. Remember when we initialized the repository named “FirstProject” in the previous part? Well, this repository is the blue box you can see in the diagram! Stage or Index This area corresponds to the project folder on your computer. ![]() Let’s take a closer look at the different areas of the local repository. It’s composed of three different areas which make up the local repository, and the GitHub remote repository. So far, you’ve discovered what version control is used for and initialized a Git repository.īefore we move on to the basic commands, take a look at the diagram below to help you understand how Git works. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |