With git, being a distributed version control system every time you wish to work on a repository you first are required to clone that repository
Cloning a git repository is essentially like making a "copy", but while it might not be that simple in reality. It's a good enough analogy for now!
The easiest way to get the link to clone a repository is to navigate to the project on GitHub. From there you will see a green "code" button like so
You will have the option to clone with HTTPS, SSH and or even the GitHub CLI tool gh
Next open your shell, you can clone a repository with the git clone
command proceeded by the URL to the project (HTTPS)
git clone https://github.com/beauwilliams/yourfirstcommit
But what actually happens when we clone a repository? 🤔🤔
git init
git remote add origin <repo-url>
git fetch --all
git checkout --track origin/master
Home Backstory Why Git? Setting Up GitHub GitHub CLI Your GitHub Profile GitHub Pages Creating A New Repo Cloning A Repository Your First Commit Ignoring Files In Git Stashing Your Changes Branching With Git Merging Git Branches Rebasing Vs Merging Git Workflows Fork And Pull Flow Your First Pull Request Automated Security Alerts Seeing The Differences Removing/Deleting Files Reverting Your Commits Configuring your Git Commit Templates Creating Shortcuts Dotfile Management Sponsoring Open Source Handy Commands Thank You