![]() ![]() Now it’s time to clone your repository from GitHub onto your computer with git clone followed by the URL you copied in the last step. Once it’s made, move into it with the cd command. If you’re not sure if you’re in your home folder, just type cd ~. Navigating Files and Directories covered variations of home folders - sometimes ~ stands for /Users/your_username and sometimes it stands for /home/your_username. Create a directory called repos with the mkdir command in your home folder. Let’s use the command line on your local machine to create a new directory for all of your Odin projects. NOTE: You MUST click the SSH option to get the correct URL. Then select the SSH option, and copy the line below it. To get ready to copy (clone) this repository onto your local machine, click the green “Code” button. This will redirect you to your new repository on GitHub. And then create the repository by clicking the “Create repository” button at the bottom of the page. Give your repository the name “git-test” in the repository name input field. If you haven’t done that yet, you can sign up here.Ĭreate a new repository by clicking the button shown in the screenshot below. You should have already created a GitHub account in the Setting Up Git lesson. For more information on the change from master to main see GitHub’s Renaming Repository.If you haven’t already, set your local default git branch to main.This means you need to make sure you are using a recent version of git (2.28 or later). Github recently updated the way it names the default branch. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |