ECE662/562 / Labs

Labs

All labs must be submitted using GitHub. Follow the instructions below to create a GitHub account and share it with your TA/instructor.

Prerequisites

  • Have Git installed on your computer
  • Have a GitHub account (free account)
  • Have a repository on GitHub where you want to commit your changes
    • Keep the repository private and share with your partner and TA umail.
    • GitHub free account has a limit of 3 collaborators: you, your lab partner, and primary TA umail for access.
  • GitHub tutorial about repositories
  • If authentication requires SSH tokens, please follow the steps in the following GitHub document to set up SSH tokens:

Step-by-Step Procedure

  1. Open Terminal or Command Prompt

    • On Windows, search for “cmd” in the Start menu.
    • On macOS or Linux, open the Terminal application.
  2. Configure Git (First-time setup)

    • Use your UMASS email address:
      git config --global user.name "Your Name"
      git config --global user.email "youremail@example.com"
      
  3. Navigate to Your Project Directory

    • Run:
      cd path/to/your/project
      
  4. Initialize a Git Repository (If not already a Git repository)

    • If your project is not yet a Git repository, initialize it by running:
      git remote add origin https://github.com/yourusername/yourrepositoryname.git
      
    • Replace https://github.com/yourusername/yourrepositoryname.git with the URL of your GitHub repository.
  5. Pull Latest Changes (Optional)

    • If your repository already exists and you’re collaborating, pull the latest changes from GitHub to avoid conflicts:
      git pull origin main
      
    • Note: Replace main with the default branch name if it’s different.
  6. Stage Changes for Commit

    • Add the files you’ve changed or created to the staging area with:
      git add .
      
    • The . adds all changed files. If you want to add specific files, replace . with the file names.
  7. Commit Changes

    • Commit your changes with a meaningful message:
      git commit -m "A meaningful commit message"
      
    • Use a meaningful commit name to understand the current state of the project. For example:
      • “7 segment display hex”
      • “Need to debug button input”
    • There is no strict rule, but the commit message should help you understand the state of the committed version.
  8. Push Changes to GitHub

    • Push your changes to GitHub:
      git push origin main
      
    • Again, replace main with your branch name if it’s different.