From the course: Working with LinkedIn Learning Exercise Files on GitHub

Clone the repository to your local computer - GitHub Tutorial

From the course: Working with LinkedIn Learning Exercise Files on GitHub

Clone the repository to your local computer

- [Instructor] Once you've found the repository for a LinkedIn Learning course on GitHub, you can clone that repository. Cloning means you're making a copy of the repository on your local hard disk. And that's the version that you'll work with as you follow along with the course. In this repository, I'll click on the Code button, and I'll click this button to copy the repo URL to the clipboard. Now to clone this in IntelliJ IDEA, I'll go to the IDEA welcome screen. The welcome screen will look different depending on which version of IntelliJ IDEA you're using. I'm working with the most recent version as of the time of this recording 2021.1. If you're using an older version, you might see a very different welcome screen. Or, if you already have projects, this welcome screen may look different. If I already had projects in my IntelliJ IDEA installation, I would see a list of projects and my get from VCS button would be at the top over here. I'll click get from VCS, and in the URL field I'll paste in that URL. You can place your copy of the GitHub repository anywhere on your hard disk. I like putting my repos under a GitHub directory under the home directory, but it's entirely up to you. The default for this will be a directory named idea projects. But you can name it anything you want, just don't put any spaces in the directory name. I'll click the clone button, and that will result in downloading the main or master branch of the repository and opening up the project in IntelliJ IDEA. Now, because this project has a Git repository, you'll see some windows and other user interface elements appear. On your toolbar up here, which may appear on the left or over on the right, you'll see these buttons. There's an update project button, a commit button, and a push button. There's also a button here to show the history of your Git activities. Down here at the bottom, you should see a Git tab and that opens up the Git window. In older versions of IntelliJ IDEA, this was called the version control window. In this window, you'll see a listing of all the different branches, and also a log of everything that's happened in this repository. The names you see here are either the instructor or folks within LinkedIn Learning who've worked on this repository. You should also see a commit tab over on the left, and this opens up something called the commit window. When you're ready to save your changes, that's called commit in Git, this is where you're going to work. And I'll talk about how to use these windows later on in this chapter. If you've gotten this far, you've successfully cloned your repository, and you're ready to work with the code in IntelliJ IDEA.

Contents