Git is an open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Services Like Github Gitlab
While these Services have a powerful User interface, which help in execution pretty much all of the Git operations right from your browser. But as you advance, You will eventually need to use command-line/(terminal).
You don't need to use any of the Services like Github/Gitlab to use git Locally, But you will need to have a Github account to collaborate with other users.
Let us first Set up git on your Local machine
- To check whether you have git already installed on your device:
$ git --versionRun this command on your terminal or Command shell. This Command checks for the current version installed in your system.
$ git --version'git' command not found
-
Now we will have to install git in your local machine, It is recommended to use git to save all your projects as it it helps you to maintain a record of all the version and changes made with each of the iteration, so if the situation goes south with your project, you can always revert back to the last stable version
- sudo add-apt-repository ppa:git-core/ppa
- sudo apt update
- sudo apt install git
-
Now check for the git version installed in your system from the command from the first point.
- git --version
Git is now successfully installed on your system, next we will configure it for our username and emailId, This setting will help in recording for what user made what changes to the project
You might want to move up aheah and create a new Github account
Once you are done with cretaing your Github account, Now we could use it locally for our local projects as soon as we installed `git`. Now we are ready to tell Github about our system, so that we dont have to enter a new password every time we want to commit a change