Workshop Materials

Essential resources for Git, GitHub, and portfolio development

Quick Navigation

Git Installation & Setup

Important: Make sure to install Git before the workshop. Follow the instructions below for your operating system.

Download Git

Windows

Download the official Git installer for Windows

Download Git for Windows

macOS

Install Git on Mac using Homebrew or the installer

Download Git for macOS

Linux

Install Git via your distribution's package manager

Download Git for Linux

Initial Git Configuration

After installing Git, you need to set up your identity. Open your terminal or command prompt and run these commands:

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

# Optional: Set default editor
git config --global core.editor "code --wait"  # For VS Code

# Optional: Set default branch name
git config --global init.defaultBranch main
Note: Replace "Your Name" and "your.email@example.com" with your actual name and email address.

Verify Your Installation

Check if Git is properly installed by running:

git --version

You should see something like: git version 2.42.0 (version number may vary)

Essential Git Commands

Command Description Example
git init Initialize a new Git repository git init
git clone Clone an existing repository git clone https://github.com/username/repo.git
git status Check the status of your repository git status
git add Add files to staging area git add index.html or git add .
git commit Commit staged changes git commit -m "Add new features"
git push Push commits to remote repository git push origin main
git pull Pull changes from remote repository git pull origin main
git branch List, create, or delete branches git branch feature-branch
git checkout Switch branches or restore files git checkout feature-branch
git merge Merge branches together git merge feature-branch

GitHub Essentials

Setting Up Your GitHub Account

  1. 1 Go to github.com/signup to create your account
  2. 2 Choose a username, email, and password
  3. 3 Verify your email address
  4. 4 Configure your profile at github.com/settings/profile
Pro Tip: Choose a professional username that you wouldn't mind sharing with potential employers.

Creating Your First Repository

Follow these steps to create a new repository on GitHub:

  1. 1 Click the "+" icon in the top-right corner of GitHub and select "New repository"
  2. 2 Enter a repository name (e.g., "my-portfolio")
  3. 3 Add an optional description
  4. 4 Choose public or private visibility
  5. 5 Select "Add a README file" to initialize your repository
  6. 6 Click "Create repository"

Cloning a Repository

To clone a repository means to create a local copy on your computer:

git clone https://github.com/username/repository-name.git

For example, to clone our workshop repository:

git clone https://github.com/Jabulani00/WorkShop.git

Connecting with SSH (Optional but Recommended)

Using SSH keys allows you to connect to GitHub without entering your username and password each time.

ssh-keygen -t ed25519 -C "your.email@example.com"

Follow the prompts to complete the process. Press Enter to accept the default file location.

  1. Copy your public key to clipboard:
    # For Windows
    type %userprofile%\.ssh\id_ed25519.pub | clip
    
    # For macOS
    pbcopy < ~/.ssh/id_ed25519.pub
    
    # For Linux
    cat ~/.ssh/id_ed25519.pub | xclip -selection clipboard
  2. Go to github.com/settings/keys
  3. Click "New SSH key"
  4. Add a title (e.g., "My Laptop")
  5. Paste your key in the "Key" field
  6. Click "Add SSH key"

HTML & CSS Resources

Text Editors & IDEs

VS Code

Powerful, free code editor with Git integration

Download VS Code

Sublime Text

Fast, lightweight text editor for code

Download Sublime

Notepad++

Simple and efficient text editor (Windows)

Download Notepad++

HTML & CSS Learning Resources

Resource Description Link
MDN Web Docs Comprehensive web development documentation Visit MDN
W3Schools Easy-to-follow tutorials and references Visit W3Schools
freeCodeCamp Free interactive learning platform Visit freeCodeCamp
CSS-Tricks Tips, tricks, and techniques for CSS Visit CSS-Tricks
Codecademy Interactive coding lessons Visit Codecademy

Starter Templates & Frameworks

Bootstrap

Popular CSS framework for responsive websites

Get Bootstrap

HTML5 Boilerplate

Professional front-end template

Get Boilerplate

Tailwind CSS

Utility-first CSS framework

Get Tailwind

Free Hosting Options

GitHub Pages

GitHub Pages is a free hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub, runs the files through a build process, and publishes a website.

Setting Up GitHub Pages

  1. 1 Create a repository named username.github.io (replace "username" with your GitHub username)
  2. 2 Clone the repository to your local machine
  3. 3 Add your HTML, CSS, and JavaScript files
  4. 4 Commit and push your changes
  5. 5 Your site will be available at https://username.github.io
# Create a new repository on GitHub named username.github.io
# Then clone it and add your files:

git clone https://github.com/Jabulani00/portfolio-tamplate.git
cd username.github.io

# Add your HTML, CSS, and JavaScript files here

git add .
git commit -m "Initial website setup"
git push -u origin main

Other Free Hosting Options

Netlify

Simple hosting for static sites with continuous deployment

Visit Netlify

Vercel

Hosting platform for frontend frameworks

Visit Vercel

Render

Cloud platform for static sites and more

Visit Render

Custom Domain Setup

Once you have your site hosted, you might want to connect a custom domain name:

  1. Purchase a domain name from a domain registrar (e.g., Namecheap, GoDaddy)
  2. Go to your GitHub repository settings
  3. Scroll to the "GitHub Pages" section
  4. Under "Custom domain", enter your domain name and click Save
  5. Configure DNS settings at your domain registrar:
    • Add an A record pointing to 185.199.108.153
    • Add an A record pointing to 185.199.109.153
    • Add an A record pointing to 185.199.110.153
    • Add an A record pointing to 185.199.111.153
    • Add a CNAME record for www pointing to your username.github.io
  6. Check "Enforce HTTPS" in your GitHub Pages settings

Workshop Files

File Description Action
HTML Starter Templates Collection of basic HTML templates for different project types Download
CSS Frameworks Comparison Guide to popular CSS frameworks with code examples Download
HTML5 Semantic Elements Reference for HTML5 semantic elements with usage examples Download
CSS Grid & Flexbox Cheatsheet Visual guide to CSS layout techniques Download
Git Command Cheatsheet Quick reference for common Git commands Download
GitHub Workflow Guide Step-by-step guide for GitHub collaboration workflows Download
Git Branching Strategies Overview of Git branching models for different project types Download