
A Beginner's Guide to Git
Learn how to set up a git repo on your local machine
So, you’re interested in learning git, but you don’t know where to start? Here are some simple first steps!
Step 1:
Install git on your local machine
First, install Homebrew.
Then, in your terminal, write:
brew install git
Now you should be good to go!
Step 2:
Make the directory that you want to initialize git in
mkdir myproject
Step 3A:
Initialize git repo on local machine!
First, make sure you step into your directory
cd myproject
Now you can initialize with the command
git init
Step 3B:
Initialize using clone
Another way to set up git repo locally is to clone and existing repo from a remote location. You do this by saying
git clone <url>
Congratulations! You’ve initialized git on your local machine!