![]() The repository that we have on our computer is referred to as the local repository.Įarlier we mentioned hosting services such as GitHub, GitLab and Bitbucket. ![]() It will track all the changes made to the files in our project and record that history over time. Creating our repository What is a Git Repository? This is generally what represents our repository. In order to view hidden files in the terminal we can use the command ls -a. If you are on a windows OS then you can change your view settings in order to view hidden files in your file system. Then, if you are on a mac you can select Command + Shift + Dot in order to see hidden files in your file system. Make sure to open your project folder in your file system. In order to see what Git did behind the scenes we will have to view our hidden files. But don’t be deceived, Git can be sneaky sometimes and it carries out a lot of actions behind the scenes. Once we execute the command by typing it in the terminal and pressing enter, it will probably seem like not much happened. Once we are in our project folder, in order to start using Git we will need to create (or initialize) a repository using the git init command. Creating our project folder How to Create a Git Repository In our example, we will create a new project folder called novel. If we were to choose an existing project then we simply navigate into that project folder in the terminal. If it is a new project, then we need to create a new project folder (hint: we can use the mkdir command) and then navigate into that project folder in the terminal. ![]() This can either be a new project or an existing project. To use Git we need to have a project that we want to version control. How to Prepare your Project Folder in Git But the steps we share are very similar if you are using a GUI. Whether you choose to use the terminal or a GUI, you will need to understand the basics of how Git works in order to use it confidently.įor the rest of this article, we will share examples using Git in the terminal. If you choose to use a GUI, then the various actions you need to take will be displayed in a more visual manner. Git offers in-depth documentation on their website. Other than a handful of commands that you will use most often, the rest you can look up whenever you need them (this is what most developers do, even those with decades of experience). Luckily you don’t have to learn these by heart. If you choose the terminal, you will have to look up which Git commands you will need. You can either use Git by typing commands in the terminal or you can use a graphical user interface (GUI) such as Sourcetree or GitKraken. The difference between GitHub and Git How to Get Started with Git Terminal vs GUI There are other companies who offer hosting services that do the same thing as GitHub, such as Bitbucket and GitLab. It's important to remember that GitHub is not Git. GitHub is a product that allows you to host your Git projects on a remote server somewhere (or in other words, in the cloud). If you don’t have Git installed you can visit the Git website and easily follow the download instructions to install the correct version for your operating system. If you already have Git installed then you will see what version you have. In order to check if you already have Git installed on your computer you can type the command git -version in the terminal. It is essential that you use Git if you want to collaborate with other developers on a coding project or work on your own project. Git is a version control system that you download onto your computer. Online course to learn Git version control.Here's what we'll go over in this article: We'll cover topics such as repositories, commits, branches and much more, so let's get started! ![]() This becomes increasingly important if you end up having a bug in your code! Git can help you with this.īut Git can also be a bit scary and confusing when you first start learning it, so in this article I will introduce Git in a humanly understandable way. If you are working on a project over time, you may want to keep track of which changes were made, by whom, and when those changes were made. It helps you track different versions of your code and collaborate with other developers. Git is a version control system that developers use all over the world. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |