Start‐up Guide - evanharbison02/Group-3-Small-Satellite-Repository- GitHub Wiki

Getting Started

This guide is for members of Group 3, or anyone who wants to learn how to use Git and GitHub. It will help you get set up quickly.

If you are hesitant to do this on your own, you are welcome to ask me for help during class time. To save time, I suggest that you install VS Code (Part 5) and complete Step 1 of creating a GitHub account (Part 3) before meeting with me.

What are Git and GitHub?

Git is a "save history" for a project, like version history in Google Docs. It records every change, who made it, and when, so you can always go back to an earlier version. It also lets many people work on the same project at once without overwriting each other's work.

GitHub is the website where the project is stored online so teams can share it. It hosts the project and makes it easier to interact with.

Part 1: Installing Git

Windows

  1. Go to the Git for Windows page.
  2. Select the Standalone Installer download link for your system.
  3. Go to the location where you downloaded the installer and run it.
  4. Once the installer has finished, press the Windows key and type "Git Bash". If it appears, you have successfully installed Git.
  5. Open "Git Bash" for the later steps.

Mac

Step 1: Install Homebrew

  1. Open the Terminal app (press Cmd + Space, type "Terminal", and press Enter).
  2. Go to Homebrew and copy the line of text under "Install Homebrew".
  3. Paste it into Terminal and press Enter.
  4. If asked for your password, type it and press Enter. Nothing will show on screen as you type, which is normal.
  5. This may take a while, so be patient. When it finishes, follow any "Next steps" instructions it prints, then keep Terminal open.

Step 2: Install Git

  1. Go to the Git for Mac page and copy the Homebrew command.
  2. Paste it into Terminal and press Enter. This may also take a while.
  3. If it asks any questions, answer "yes".
  4. To confirm it worked, type the following and press Enter. If you see a version number, you're all set.
git --version

Linux

If you are using Linux, I think you have this covered.

Part 2: Setting Up Your Project Location

Once you have installed Git, you need to clone the repository. Cloning means making a local copy of the project on your own computer.

Step 1: Prepare your copy

  1. In Terminal or Git Bash, run the clear command:

    clear
    
  2. Open your file explorer (Windows) or Finder (Mac) and go to the folder where you want to save the project.

  3. Copy the path to that folder:

    • Windows:
      1. Left-click the folder where you'll save it.
      2. Right-click the folder and select "Copy as path".
      3. Go back to Git Bash.
    • Mac:
      1. Right-click the folder.
      2. Hold the Option key and select "Copy [folder name] as Pathname".
      3. Go back to Terminal.
  4. Change your location to the folder where you want your project to be by running the following command:

    cd [your copied path here]
    

    Mac example:

    cd /Users/username/Documents/Sat_Project
    

    Windows example:

    cd "C:\Users\username\Documents\Sat_Project"
    

Part 3: Setting Up GitHub

Step 1: Create a GitHub account

  1. Create a new GitHub account.
    • Use your school email.
  2. Set up two-factor authentication (2FA) and use Okta.
    • Trust me, this will help you big time if something bad happens. I have seen it first-hand.
  3. Create a recovery key.
    • Save your key in a safe place on your computer as a text file.

Step 2: Set up authentication

  1. Generate an SSH key.
    • Follow the Connect with SSH guide until you reach the "Testing your SSH connection" step.
    • Note: It is likely for this to be used but will safe time if needed later down the line.
  2. Create a personal access token (PAT).
    • Go to Settings -> Developer settings.
    • Select Personal access tokens, then Tokens (classic).
    • Select Generate new token, then Generate new token (classic).
    • Fill in the token information:
      • Give it a unique name.
      • Set the expiration to "No expiration".
      • Select all of the scope options.
        • If this were a "real" repository, this would not be safe to do, but for this project it's fine.
    • Copy the token and save it somewhere safe on your computer. I suggest creating a text document and saving it there.
    • You will use this token when cloning the repository (also called a "repo").

Part 4: Cloning the Repo

  1. If you are not already there, go to the location where you want to save your copy of the repo in Terminal (Mac) or Git Bash (Windows).

  2. Run this command:

    git clone https://github.com/evanharbison02/Group-3-Small-Satellite-Repository-.git
    
    • You can find the URL by going to the project page and selecting Code -> HTTPS, then clicking the option to copy it to your clipboard.
  3. You will be asked to enter your GitHub username and token.

    • Type your username and press Enter.
    • Copy your PAT and paste it when asked.
  4. Check that a new folder has been created at that location by running this command:

    ls
    
    • If it returns "Group-3-Small-Satellite-Repository-/", the repo has been cloned successfully.

Part 5: Installing VS Code for Git

We will use VS Code to edit our code and interact with our repo.

  1. Install VS Code using the following link.
  2. After you install VS Code, you will need to connect your GitHub account to it.
  3. To check that everything is working, open the README file (the one with the ASCII art) and type your name at the bottom.
  4. Save the file, then go to the "Source Control" section.
  5. Move your mouse over the README file and select the plus sign labeled "Stage Changes".
  6. Write a short description of what you have done in the text box at the top. This is called a commit message.
  7. Once you have written your commit message, go to the Commit button.
    • Click the dropdown arrow next to it.
    • Select "Commit & Sync".
  8. You will then see a new dot added to the graph below. This is the "commit tree".

Other Useful Resources

  • Git Cheat Sheet
    • You will interact with Git mainly with VS Code, but this will be helpful understanding what these commands mean
  • Linux Commands Cheat Sheet
    • This should help you understanding and knowing the commands that I have told you to run in your Terminal or Git Bash
    • Note: There are a lot of commands that you may not use but should be helpful nonetheless.
  • Markdown Cheat Sheet
    • This is not directly related to the setup process but will help you understand how to edit documents on the wiki
    • The wiki uses a file format call markdown which works a little differently then most documents