A one-page personal card you'll make your own and put live on the internet — using Git and GitHub.
- Fork this repo
- Clone your fork to your laptop
- Add your details
- Commit and push
- Turn on GitHub Pages and get a live link
- Ship a dark mode using a branch
git --version # should print a version number
git config --global user.name "Your Name"
git config --global user.email "you@email.com" # same email as your GitHub accountClick Fork (top right of this page), then Create fork.
You now have your own copy at github.com/<your-username>/dev-card.
Clone your fork, not this original repo. You can't push to a repo you don't own.
On your fork, click the green Code button and copy the HTTPS URL.
git clone https://github.com/<your-username>/dev-card.git
cd dev-cardOpen the folder in VS Code (or any editor) and open index.html.
Every place you need to change is marked with a ✏️ EDIT comment: your name, initials, bio, skills and links.
Save the file, then open it in your browser to check it.
git status # index.html shows as modified
git add index.html
git commit -m "Add my details to dev card"git pushRefresh your fork on GitHub. Your changes and your commit message are there.
First push asks you to sign in? Windows: a browser window opens — sign in to GitHub. Mac/Linux: GitHub doesn't accept your account password here. Run
gh auth login(GitHub CLI) or use a personal access token.
On your fork: Settings → Pages → Build and deployment Source: Deploy from a branch · Branch: main · Folder: / (root) → Save
Wait a minute or two, then open:
https://<your-username>.github.io/dev-card/
Open it on your phone. That's your site, on the internet. 🚀
git switch -c dark-modeOpen style.css. At the top you'll find five colour variables. Replace them with these (or pick your own):
:root {
--bg: #0f1420;
--card: #1a2130;
--text: #e8ecf3;
--muted: #9aa4b6;
--accent: #7aa7ff;
}Commit it on the branch:
git add style.css
git commit -m "Change theme to dark mode"Now switch back and look at style.css again:
git switch mainThe colours are back to light. Your dark mode is safe on its own branch. Bring it in and ship it:
git merge dark-mode
git pushRefresh your live link in a minute — it's dark now.
- Add a Projects section to
index.htmland push it as a new commit - Run
git log --onelineand read your project's history - Make a change, run
git diffto see it, thengit restore index.htmlto undo it
| Command | What it does |
|---|---|
git clone <url> |
Copy a repo to your laptop |
git status |
See what changed |
git add <file> |
Stage changes |
git commit -m "..." |
Save a snapshot |
git push |
Send commits to GitHub |
git switch -c <name> |
Create and switch to a branch |
git switch <name> |
Switch branches |
git merge <branch> |
Bring a branch's work into the current one |
git log --oneline |
View history |
Made for a Git & GitHub session by Leapo.