Essential resources for Git, GitHub, and portfolio development
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
Check if Git is properly installed by running:
git --version
You should see something like: git version 2.42.0 (version number may vary)
| 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 |
Follow these steps to create a new repository on GitHub:
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
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.
# 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
| 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 |
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.
username.github.io (replace "username" with your GitHub username)
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
Once you have your site hosted, you might want to connect a custom domain name:
| 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 |