🚀 GitHub Assessments 📋 27 Questions 📄 Practical Guide

GitHub Fundamentals
to Advanced Features

A step-by-step practical guide covering repository management, branching, pull requests, GitHub Actions, deployment, and more.

📄Section 1 — Basic Operations
🌿Section 2 — Branching
📋Section 3 — Issues & Projects
Section 4 — GitHub Actions
🔥Section 5 — Advanced Features
Bonus — GitHub Pages
📄  Section 1 — Basic GitHub Operations
Q1Create Repository
  1. 1Open GitHub in your browser.
  2. 2Click on New to start creating a repository.
image.png
  1. 3Enter the Repository name.
  2. 4Check Add README.md to initialize the repo with a README file.
image-2.png
  1. 5The repository will be created. You will see the new repo page as shown below.
image-3.png
Q2Clone Repository
  1. 1Open a terminal and navigate to an empty folder.
  2. 2Run the clone command:
bash
git clone <Repo_Url>
  1. 3Verify the repository was cloned by listing the directory:
bash
ls
  1. 4You should see your repository folder. Enter it and verify the files:
bash
cd my-first-repo
ls
  1. 5You should see README.md listed in the directory.
image-8.png
Q3Create and Commit File
  1. 1Create a new text file using the nano editor:
bash
nano hello_world.txt
image-9.png
  1. 2Write something in the text file, then save and exit (Ctrl+O to save, Ctrl+X to exit).
image-10.png
  1. 3Stage the changes:
bash
git add hello_world.txt
  1. 4Commit the file with a descriptive message:
bash
git commit -m "Type a neat commit message"
image-11.png
Q4Push to GitHub
  1. 1Push the local commits to GitHub:
bash
git push origin main
  1. 2Enter your GitHub username and password (or Personal Access Token) when prompted.
image-12.png
  1. 3Refresh your GitHub repository page and verify that hello_world.txt has been added.
image-13.png
🌿  Section 2 — Branching and Collaboration
Q5Create Feature Branch
  1. 1Create a new branch and switch to it in one command:
bash
git switch -c <new_branch_name>
image-14.png
💡
Why Feature Branches?
Creating a dedicated branch keeps your new feature isolated from the stable main branch. You can develop freely without risking the working codebase.
Q6Commit and Push Branch
  1. 1Create a new image file (e.g., logo.png) in the repository directory.
  2. 2Stage, commit, and push the file to the feature branch:
bash
git add logo.png
git commit -m "Add logo image"
git push origin feature/add-logo
image-15.png
Q7Create Pull Request
  1. 1Go to your GitHub repository. GitHub will show a Compare & Pull Request banner for the recently pushed branch. Click it.
image-16.png
  1. 2Enter a clear title and description for the pull request.
  2. 3Click Create Pull Request.
image-17.png
Q8Merge Pull Request
  1. 1Open the pull request on GitHub.
  2. 2Click Merge Pull Request.
  3. 3Enter the commit message and description, then click Confirm Merge.
image-18.png
  1. 4After the merge, you will see a success message: “Pull request successfully merged and closed.”
📋  Section 3 — Issues and Project Management
Q9Create Issue
  1. 1Open the Issues tab in your repository.
  2. 2Click New Issue.
  3. 3Enter the title and description of the issue.
  4. 4Click Submit new issue.
image-20.png
image-19.png
Q10Assign and Label

Assigning the issue:

  1. 1Open the issue.
  2. 2In the right sidebar, click Assignees and select the assignee.
image-21.png

Adding a label:

  1. 1Open the issue.
  2. 2In the right sidebar, click Labels and select a label (e.g., bug, enhancement).
image-22.png
Q11Create Project Board
  1. 1Go to the Projects tab and click New Project.
image-23.png
  1. 2Select the Board template.
image-24.png
  1. 3Enter the project name and click Create.
image-25.png
  1. 4After creating, you will see your repository issues appear on the project board.
image-26.png
⚡  Section 4 — GitHub Actions
Q12Create CI Workflow
  1. 1Create the workflows directory and open the workflow file:
bash
mkdir -p .github/workflows
cd .github/workflows
nano ci.yml
  1. 2Paste the following CI workflow configuration:
yaml — .github/workflows/ci.yml
name: CI WORKFLOW

on:
  push:
    branches:
      - main

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - name: Print Message
        run: echo "CI is Working!"
  1. 3Save the file, then commit and push:
bash
git add .
git commit -m "Add CI workflow"
git push origin main
image-27.png
image-28.png
Q13Trigger Workflow
  1. 1Make any small change to a file in the repository.
  2. 2Commit and push the change to main.
  3. 3Open the Actions tab in GitHub.
  4. 4Verify the workflow ran successfully — you should see a green checkmark.
image-29.png
image-30.png
Q14Deployment Workflow

Step A — Connect Netlify to GitHub:

  1. 1Open Netlify in your browser.
image-31.png
  1. 2Click Import from GitHub, select the repository, and click Install.
image-32.png
  1. 3Click on your repository to configure it.
image-33.png
  1. 4Enter the project name, scroll down, and click Deploy.
image-34.png

Step B — Copy secrets from Netlify:

  1. 5Copy the Personal Access Token from Netlify.
image-35.png
  1. 6Also copy the Project / Site ID.
image-38.png

Step C — Add secrets to GitHub:

  1. 7In your GitHub repository, go to Settings → Secrets and variables → Actions and add both tokens.
image-39.png

Step D — Create the deployment workflow:

  1. 8Create .github/workflows/deploy.yml and paste:
yaml — .github/workflows/deploy.yml
name: Deploy to Netlify

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Install Netlify CLI
        run: npm install -g netlify-cli

      - name: Deploy to Netlify
        run: |
          netlify deploy \
            --prod \
            --dir=. \
            --site=$NETLIFY_SITE_ID \
            --auth=$NETLIFY_AUTH_TOKEN
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
  1. 9Commit and push. Watch the status in the Actions tab.
image-40.png
  1. 10Open Netlify and verify the deployment is live.
image-41.png
🔥  Section 5 — Advanced GitHub Features
Q15Fork Repository
  1. 1Choose any open-source repository on GitHub.
  2. 2Click the Fork button in the top-right corner.
image-42.png
image-43.png
  1. 3Clone your fork and create a new branch:
bash
git clone <fork-url>
cd <repo-name>
git switch -c new_branch
image-44.png
💡
What is a Fork?
A fork creates your own copy of someone else’s repository. You can freely experiment in your fork, then propose changes back to the original via a pull request — without ever needing write access to the original.
Q16Submit Pull Request (from Fork)
  1. 1Edit the README or fix a typo in a file.
  2. 2Commit and push the change to your fork:
bash
git add .
git commit -m "Fix README typo"
git push origin new_branch
image-45.png
  1. 3Create a Pull Request targeting the original repository (not your fork).
image-46.png
image-47.png
Q17Add Git Submodule
  1. 1Run the following commands to add a submodule, commit, and push:
bash
git submodule add <repository-url>
git commit -m "Add submodule"
git push
image-48.png
⚠️
What is a Submodule?
A Git submodule lets you include another repository as a subdirectory of your project. The parent repo tracks the submodule by commit reference — useful for shared libraries or third-party dependencies you want to pin to a specific version.
Q18GitHub Discussions
  1. 1Go to Settings → Features in your repository and enable Discussions.
image-49.png
  1. 2Open the Discussions tab and click New Discussion.
image-50.png
  1. 3Select a category/topic for the discussion.
image-51.png
  1. 4Add the title and body of the discussion.
image-52.png
  1. 5Click Start Discussion to publish it.
🌟  Section 6 — Best Practices and Versioning
Q19Create Tag
  1. 1Create a tag and push it to GitHub:
bash
git tag v1.0.0
git push origin v1.0.0
image-53.png
  1. 2Check the Tags page in your GitHub repository to confirm the tag is listed.
image-54.png
Q20Branch Protection
  1. 1Go to Settings → Branches in your repository.
  2. 2Click Add classic branch protection rule.
image-55.png
  1. 3Type the branch name pattern (e.g., main) and select a rule such as Require a pull request before merging.
image-56.png
  1. 4Click Create. The rule will be active and visible in the Branches settings.
image-57.png
⭐  Bonus Assessment — GitHub Pages
⭐ Q21GitHub Pages — Deploy a Live Website
  1. 1Create a new GitHub repository named exactly <yourusername>.github.io (e.g., satwik.github.io).
  2. 2Add an index.html file with the following content:
html — index.html
<!DOCTYPE html>
<html>
<head>
  <title>My Website</title>
</head>
<body>
  <h1>Hello GitHub Pages!</h1>
</body>
</html>
  1. 3Push the code to GitHub.
  2. 4In your repository, go to Settings → Pages.
  3. 5Under Branch, select your branch (e.g., main) and click Save.
image-58.png
image-59.png
  1. 6After saving, the Pages section will show your deployment status and the live URL.
image-62.png
  1. 7Click Visit site — your GitHub Pages website will open in the browser.
image-63.png
📖  Reflection Questions
Q22What is the purpose of staging in Git?
Staging allows you to select specific changes before creating a commit. Instead of committing every modified file at once, you can carefully choose which changes belong together in one logical commit — making your project history cleaner and easier to understand.
Q23Why is branching important in software development?
Branching lets developers work on new features, bug fixes, or experiments independently without affecting the main codebase. Each branch is an isolated environment — work can proceed in parallel, and only tested, reviewed code gets merged back into main.
Q24How do pull requests contribute to code quality?
Pull requests create a formal review process before code is merged. Team members can read the changes, leave comments, suggest improvements, and discuss implementation decisions. This catches bugs early, improves code consistency, and spreads knowledge across the team — all before a single line reaches the main branch.
Q25What is GitHub Actions and what can it automate?
GitHub Actions is a built-in CI/CD platform that automatically runs workflows in response to events like a push or pull request. It can automate building and testing code, deploying to production, running lint checks, sending notifications, and any other task defined in a YAML workflow file — all without leaving GitHub.
Q26Why are tags used in software releases?
Tags mark a specific, named point in the repository’s history — typically a stable release (v1.0.0, v2.1.3). This allows developers to easily return to any previous release, create GitHub Releases with downloadable assets, drive OTA firmware updates, and give users a clear version history to reference.
Q27When should you fork a repository instead of working directly in it?
Use a fork when you want to contribute to a repository you do not own and therefore do not have write access to. The fork gives you a personal copy of the project where you can freely make changes, then propose them back to the original via a pull request. This is the standard workflow for open-source contributions.
✅ What This Guide Covered
  • Section 1 — Creating a repo, cloning, committing files, and pushing to GitHub.
  • Section 2 — Feature branches, pushing a branch, creating and merging pull requests.
  • Section 3 — Issues, assigning and labelling, project boards.
  • Section 4 — Creating CI workflows, triggering them, and deploying to Netlify with GitHub Actions.
  • Section 5 — Forking, cross-repo pull requests, Git submodules, and Discussions.
  • Section 6 — Tagging releases and protecting branches with rules.
  • Bonus — Publishing a live website with GitHub Pages.
  • Reflection — Reasoning behind staging, branching, PRs, Actions, tags, and forks.

GitHub Assessments — Practical Guide  |  27 Questions across 6 Sections