Your Step-by-Step Guide to Mastering GitHub
You're on the tutorial/github-basics-for-jb branch - your personal learning space!
https://github.com/codespaces/jb-workspace-vj4jjqqgwq63pg45
- Go to https://github.com/PRSMTECH/JB-cliagent
- Click the green "<> Code" button
- Click "Codespaces" tab
- Click on "jb-workspace"
Once your Codespace opens, run these commands in the terminal:
npm install -g @anthropic-ai/claude-codeclaude/load
/tasks
That's it! You're ready to work.
| Step | Action |
|---|---|
| 1 | Go to the repo URL Swizz sends you |
| 2 | Click the green "<> Code" button |
| 3 | Click "Codespaces" tab |
| 4 | Click "Create codespace on main" |
| 5 | Wait ~2 minutes for setup |
| 6 | Run claude to start working |
- Go to: https://github.com/codespaces
- Click "New codespace"
- Search for the repo (e.g.,
PRSMTECH/new-project) - Select the branch (usually
main) - Click "Create codespace"
# Create codespace for any repo
gh codespace create --repo PRSMTECH/repo-name
# List your codespaces
gh codespace list
# Open a codespace
gh codespace code -c codespace-name| When You Do This | Swizz Sees This |
|---|---|
| Make changes in Codespace | Commits appear in repo history |
| Create a new branch | Can review your work via PR |
| Push commits | Can pull to local machine |
| Update Memory Bank | Context syncs via git |
| Open a Pull Request | Gets notified to review |
┌─────────────────────────────────────────────────────────┐
│ │
│ You (Codespace) Swizz (Local) │
│ │ │ │
│ │ ── git push ──────────► │ │
│ │ │ │
│ │ ◄────── git pull ────── │ │
│ │ │ │
│ │ ── Pull Request ──────► │ │
│ │ │ │
│ │ ◄───── Review/Merge ─── │ │
│ │ │ │
└─────────────────────────────────────────────────────────┘
| Do This | Why |
|---|---|
git pull before starting |
Get Swizz's latest changes |
| Commit often with good messages | Easy to track progress |
| Push at end of session | Swizz can see your work |
| Create PRs for big changes | Get feedback before merging |
Use /save before pushing |
Preserve your AI context |
Think of GitHub like Google Docs for code - but way more powerful:
| Feature | What It Does | Real World Example |
|---|---|---|
| Repository | A project folder | Your JB-cliagent workspace |
| Commit | A save point | "Added new email template" |
| Branch | A separate version | Test changes without breaking main |
| Pull Request | Request to merge | Ask Swizz to review your changes |
| Codespace | Cloud workspace | Work from any browser |
A repository is your project's home. Everything lives here - code, files, history.
PRSMTECH/JB-cliagent ← This is YOUR repo
Your repo contains:
- Your AI assistant configuration
- Memory Bank (saved context)
- Skills and commands
- All your work history
A commit is like pressing "Save" - but smarter. Each commit:
- Has a message describing what changed
- Has a unique ID so you can go back anytime
- Shows who made the change and when
Good commit messages:
| Do This | Not This |
|---|---|
Add email draft feature |
stuff |
Fix contact sorting bug |
changes |
Update task list format |
asdfasdf |
How to commit:
git add . # Stage all changes
git commit -m "Your message here" # Save with a message
git push # Upload to GitHubA branch is a separate version of your code. Like making a copy to experiment on.
main (the official version)
│
├── feature/new-email ← You're experimenting here
│
└── fix/contact-bug ← Someone else is fixing this
Why branches matter:
- Test ideas without breaking the main version
- Work on features independently
- Merge when ready
You're currently on: tutorial/github-basics-for-jb
The main branch: main (production-ready code)
A Pull Request asks to merge your branch into another (usually main).
Your Branch Main Branch
│ │
│ ┌──────────────┐ │
└───►│ Pull Request │─────────►│
│ (Review) │ │
└──────────────┘ │
The PR workflow:
- You create changes on your branch
- Open a Pull Request
- Swizz reviews the changes
- Approved? → Merge into main
- Changes are now live!
# 1. Open your Codespace
# Go to: github.com/codespaces
# Click on your workspace
# 2. Get latest changes
git pull
# 3. Start Claude
claude
# 4. Load your context
/load
# 5. Check your tasks
/tasks# Save your progress often
git add .
git commit -m "What you did"
git push# 1. Save your AI context
/save
# 2. Commit your work
git add .
git commit -m "End of day: what you accomplished"
git push| What You Want | Command | Example |
|---|---|---|
| See what changed | git status |
Shows modified files |
| Save changes | git add . |
Stage all files |
| Create save point | git commit -m "msg" |
git commit -m "Add feature" |
| Upload to GitHub | git push |
Sync with cloud |
| Download updates | git pull |
Get others' changes |
| See history | git log --oneline |
List all commits |
| Create branch | git checkout -b name |
git checkout -b feature/new |
| Switch branch | git checkout name |
git checkout main |
| What You Want | Command | What It Does |
|---|---|---|
| See tasks | /tasks |
Shows your prioritized task list |
| Draft email | /email [who] [about] |
Creates ready-to-send email |
| Create content | /content [topic] |
Generates brand content |
| View contacts | /contacts |
Shows your contact database |
| Get news | /news [topic] |
Fetches latest industry news |
| Save session | /save |
Saves context for next time |
| Load session | /load |
Restores previous context |
- Go to your repo:
github.com/PRSMTECH/JB-cliagent - Click "Pull requests" tab
- Click "New pull request"
- Select your branch (e.g.,
tutorial/github-basics-for-jb) - Click "Create pull request"
- Add a title and description
- Click "Create pull request"
gh pr create --title "What I did" --body "Description of changes"- Swizz gets notified
- Reviews your changes
- Leaves comments or approves
- Merges when ready
Step 1: Create a file with your name
echo "JB was here - $(date)" > jb-first-commit.txtStep 2: Check what changed
git statusYou should see jb-first-commit.txt in red (untracked)
Step 3: Stage the file
git add jb-first-commit.txtStep 4: Commit it
git commit -m "My first commit - JB learning GitHub"Step 5: Push to GitHub
git pushStep 6: Check GitHub - your file is there!
Go to: github.com/PRSMTECH/JB-cliagent and you'll see your commit!
Go to: https://github.com/codespaces
| Action | How To |
|---|---|
| Open | Click on codespace name |
| Stop | Click ••• → Stop codespace (saves costs) |
| Delete | Click ••• → Delete (removes workspace) |
| Rename | Click ••• → Rename |
# List all codespaces
gh codespace list
# Stop a codespace (saves money)
gh codespace stop -c codespace-name
# Delete a codespace
gh codespace delete -c codespace-name
# SSH into a codespace
gh codespace ssh -c codespace-name- Codespaces auto-stop after 30 minutes of inactivity
- Stop manually when taking long breaks
- Delete codespaces you're not using
- PRSMTECH pays for usage - be mindful!
git pullThis downloads the latest changes from GitHub.
This happens when the same file was changed in two places. Don't panic!
- Open the file - you'll see conflict markers
- Choose which version to keep
- Remove the
<<<<<<<,=======,>>>>>>>markers - Commit the resolution
First time? Ask Swizz for help - conflicts are easier to learn together.
Make sure you're logged in:
gh auth statusIf not:
gh auth login- Go to https://github.com/codespaces
- Find your codespace
- Click
•••→ Rebuild container - Wait for it to rebuild
npm install -g @anthropic-ai/claude-codeJB-cliagent/
├── .claude/
│ └── CLAUDE.md # Your AI's brain
├── .memory-bank/
│ ├── context.md # Current focus
│ ├── tasks.md # Your task list
│ ├── contacts.md # Contact database
│ ├── content.md # Saved content
│ └── notes.md # Important notes
├── skills/ # Custom commands
├── docs/ # Documentation
├── introduction-to-github/ # GitHub course
├── communicate-using-markdown/# Markdown course
└── README.md # This file!
| Daily Action | Command |
|---|---|
| Start of day | git pull then claude then /load |
| Save work | git add . && git commit -m "msg" && git push |
| End of day | /save then commit and push |
| Create PR | gh pr create |
| Check status | git status |
| New codespace | Green "Code" button → Codespaces → Create |