This repository uses git for version control to track your learning progress across different Python topics.
Repository is already initialized with:
- ✅
.gitignore- Excludes virtual environments, cache files, etc. - ✅
.gitconfig- Local git settings for this project
git statusShows what files have changed.
# Stage all changes
git add .
# Stage specific files
git add topics/fizzbuzz/main.pygit commit -m "Add fizzbuzz implementation"git log --oneline# Create and switch to a new branch
git checkout -b topic/new-topic-name
# Initialize the topic using uv
cd topics/
uv init --app new-topic-name --vcs none
cd new-topic-name/
uv add --dev pytest # Add to THIS topic's environment
uv sync # Create .venv/ for THIS topic
# Work on your code...
# When ready to save progress:
git add .
git commit -m "Initial implementation of new-topic-name"Note: Each topic's .venv/ directory is automatically ignored by git (in .gitignore), but pyproject.toml and uv.lock are tracked to reproduce the environment.
# Switch back to main branch
git checkout main
# Merge your topic branch
git merge topic/new-topic-name
# Optional: Delete the topic branch
git branch -d topic/new-topic-name# Quick save of current work
git add .
git commit -m "WIP: working on algorithm optimization"| Command | Description |
|---|---|
git status |
Show current state |
git add . |
Stage all changes |
git commit -m "msg" |
Commit with message |
git log --oneline |
Show commit history |
git diff |
Show unstaged changes |
git diff --staged |
Show staged changes |
git checkout <branch> |
Switch branches |
git branch |
List all branches |
git branch <name> |
Create new branch |
main: Stable, completed topicstopic/<name>: Work-in-progress branches for each topicexperiment/<name>: For trying different approaches
# Start learning recursion
git checkout -b topic/recursion
# Initialize the topic with uv
cd topics/
uv init --app recursion --vcs none
cd recursion/
uv add --dev pytest
uv sync
# Code, test, repeat...
# Save progress frequently
git add .
git commit -m "Add basic recursive factorial"
# Continue working...
git add .
git commit -m "Add recursive fibonacci with memoization"
# When satisfied with the topic
git checkout main
git merge topic/recursion
git branch -d topic/recursion- Commit often - Small, frequent commits are better than large ones
- Use descriptive messages - "Add bubble sort algorithm" vs "update code"
- One topic per branch - Keep different learning topics separate
- Review your progress - Use
git logto see your learning journey
git reset --soft HEAD~1git reset --hard HEADgit stash
git checkout <branch>
git stash pop