Github Rep First

The first (and easier) option is:

  • create a repository in github
  • clone it to your local computer

In this way, all your remote definitions will be configured automatically.

Create a new repository in github

  • login to github.
    This is changing from time to time, and my involve configuring a phone as a secondary authentication device, enetering credentials etc.
  • Find the + sign at the top, click it and select New repository
  • Fill in the repository name
  • Choose it this is going to be a public or a private repository:
    • Public rep is Visible to anyone on the internet
    • Anyone can view, clone, and fork the repository
    • Only repository owners/collaborators can push changes directly
      (and you'll need to configure SSH for that)
    • Private rep is only visible to you and people you explicitly share with
  • You can choose other options (add README.md, add .gitignore file..) but you may leave everything at its defaults, and hit Create repository button at the end.

Clone to your local environment

  • The command for cloning a repository is:
1git clone <repository URL>
  • PUBLIC REP:
    You can clone a public repository by using the HTTPS

    • This is how you do it:
      • Navigate to the GitHub repository you want to clone
      • Click the green "Code" button near the top of the repository page
      • Make sure "HTTPS" is selected in the dropdown menu
      • Copy the URL that appears (it will look something like https://github.com/username/repository.git)
      • Open your terminal or command prompt
      • Navigate to the directory where you want to clone the repository
      • Run the command:
        git clone https://github.com/username/repository.git
  • PRIVATE REP

    • Yes, you can use the HTTPS URL, but then you'll need a Personal Access Token (which I'll not cover here)
    • A usefull way to to that would be to use the GIT URL, and make sure you have configured SSH.
    • Look at the git top top git menu, and look for your SSH configuration instruction (Windows or Linux)
    • Once that is done, you can clone you repository:
      git clone

    Good Luck!