As with any tool, we need to install and configure it before we can use it.
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. If you don't already have Visual Studio Code installed, you can install it by doing the following:
On MacOS / Windows:
- Go to git-scm.com/downloads.
- Download the software for Mac/Windows.
- Install Git choosing all of the default options.
On Linux, execute the following command:
sudo apt-get install git
Open Git bash and execute the following Commands:
-
Configure your Git profile.
# sets up Git with your name git config --global user.name "<Your-Full-Name>"
# sets up Git with your email git config --global user.email "<your-email-address>"
-
Configure your UI output color.
# makes sure that Git output is colored git config --global color.ui auto
-
Configure Git with your code editor:
i. For Atom editor, execute the following command:
git config --global core.editor "atom --wait"
ii. For VSCode, execute the following command:
git config --global core.editor "code --wait"
-
Review all the configuration options.
# lists all the configuration properties git config --list
Now, you have successfully installed and configured Git. The next step is to practice working with a local repository.