Skip to content

GitHub Walkthrough Assignment

This assignment walks you through creating a new GitHub repository, making your first commit, and pushing code to a remote. Follow each step carefully and refer back whenever you start a new project.

1. Create the Repository on GitHub

  1. Sign in to your GitHub account.
  2. Click the New button from your repositories page.
  3. Name the repo, add a short description, and choose Public or Private.
  4. Check Add a README file so you have an initial commit.
  5. Click Create repository.

2. Clone the Repository Locally

Use git clone to copy the repo to your computer:

git clone https://github.com/your-username/your-repo.git
cd your-repo

Configure Git with your name and email if you haven't already:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

3. Add and Commit Changes

  1. Create or edit files inside the repository folder.
  2. Stage changes using git add:
git add filename1 filename2
  1. Commit the staged files with a descriptive message:
git commit -m "Add initial project files"

4. Push to GitHub

Send your commits to the remote repository:

git push origin main

Replace main with your branch name if different.

5. Visualizing the Workflow

flowchart LR
    A[Create repo on GitHub] --> B[Clone locally]
    B --> C[Add/modify files]
    C --> D[git add]
    D --> E[git commit]
    E --> F[git push]
    F --> G[View changes on GitHub]

Completing these steps ensures your code is version controlled and safely stored on GitHub. Repeat this workflow for all your Innovation Studio assignments.