Back to Blog
Git commands6/17/2023 Second one is the Index which acts as a staging area and finally the HEAD which points to the last commit you’ve made.Ĭheckout your repository (repository you just created or an existing repository on a server) using: git clone /path/to/repository Add files and commit ![]() Your local repository consists of three “trees” maintained by git.įirst one is your Working Directory which holds the actual files. RepositoryĬreate a new directory, open it and run this command: git init Create a New Git Repository With git init sudo vim ~/.gitconfigĪnd you are done with setting up. Now you can open it using vim editor or any of your favourite text editors. Replace ‘User’ with your username and ‘ ’ with your email. You can use the follow commands to add in the required information. You can later access this file at ~/.gitconfig. Setup GitĪfter Git is installed, whether from apt or from the source, you need to copy your username and email in the gitconfig file. To install git on Ubuntu and other Ubuntu-based systems, run this command : sudo apt install git-coreĪfter it is finished, you will have Git installed and ready to use. Apart from installation, the rest of the commands are the same in all Linux distributions. I am using Ubuntu in this tutorial but you can use any Linux distribution of your choice. In this tutorial, we will play around Git and learn how to get started. ![]() The program allows for the non-linear development of projects and can handle large amounts of data effectively by storing it on the local server. It was started in the year 2005 by Linux creator, Linus Torvalds. Git is a distributed version control system that is widely used by a number of open source projects. In this article, we’ll see all the basic Git commands you need to get started with it. You have seen the quick guide and Vi cheat sheet download in an earlier post.
0 Comments
Read More
Leave a Reply. |