GIT Installation on macOS
Git is a free, open-source, and most widely used version control system designed to handle projects from small to very large projects with speed and efficiency.
It can be used to track changes in your project source code during your software development process.
Start by checking pre-installed git on your local machine.
Keep in mind that you only need to install git at once.
$ git --version
The easiest way to install Git on a Mac is via the stand-alone installer:
- Download the latest Git for Mac installer.
- Follow the prompts to install Git.
- Configure your git username and email using the following commands:
$ git config --global user.name "John Doe"
$ git config --global user.email "email@example.com"
4. Congratulations! You’ve just installed git software on your local machine.
Check your git configuration using this command.
$ git config --list
Create your first git repository using the following steps:
Git repository is a virtual storage of your project that allows you to create and save versions of your source code.
- Using your macOS terminal, create/go to your project folder.
$ cd /path/to/your/project
2. Initialized your project with git using the following command.
$ git init
3. Great job! You’ve just created your first git repository.
Take your skills to the next level by exploring Github.
Let’s collaborate soon!