Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Task 01 - Set up a GitHub repository

  • Some learners create their first repository via GitHub Desktop. Make sure learners understand how a distributed source control such as Git differs from a centralized source control system such as Team Foundation Version Control (TFVC) or Subversion (SVN).
  • To clone a repository via command line, run git clone $URL in the directory into which you wish to copy the repository. In order to get the value for URL, perform the following steps:
    • Navigate to your repository in GitHub.
    • Select the green button labeled “<> Code”.
    • In the Clone section of the Local tab, select the copy button to get the URL.
  • Add the training files into the root of this new directory.
  • In the command line, the command git add --all will mark for tracking all of the files you just copied to the folder.
  • In order to commit changes, type in a command such as git commit -am "My first commit". Note that the commit message can be whatever you wish it to be.
  • The final step is to push this code to the remote GitHub repository. To do this, execute the command git push -u. If this is the first time you are pushing to a particular GitHub repository, you might see a warning message.