Project: Personal Learning Repository

Introduction

This project walks through a complete solo workflow: initialize a repo, commit learning notes, branch for experiments, merge back, tag a milestone, and push to GitHub with a proper .gitignore. By the end you will have a portfolio-ready repository that demonstrates every core Git skill from this track.

Prerequisites

Goal

Build learning-notes repo containing:

  • README with your goals
  • Small code sample (Node or Java)
  • Feature branch with one extra file
  • Tag v0.1.0
  • Remote on GitHub with .gitignore

Step 1: Initialize and First Commit

bash
mkdir learning-notes
cd learning-notes
git init
git switch -c main

Create README:

bash
cat > README.md << 'EOF'
# Learning Notes
 
Personal sandbox for Git practice and hello_code tutorials.
EOF

Node sample (optional):

bash
mkdir src
echo "console.log('learning');" > src/index.js
echo "node_modules/" > .gitignore
echo "dist/" >> .gitignore

Configure identity if needed, then:

bash
git add .
git commit -m "Initial commit with README and sample script"

Verify:

bash
git log --oneline
git status

Step 2: Feature Branch and Merge

bash
git switch -c feature/add-notes

Add content:

bash
mkdir docs
echo "# Day 1\nLearned git init and commit." > docs/day1.md
git add docs/day1.md
git commit -m "Add day 1 learning notes"

Merge to main:

bash
git switch main
git merge feature/add-notes
git branch -d feature/add-notes
git log --oneline --graph

Step 3: Tag Milestone

bash
git tag -a v0.1.0 -m "First learning milestone"
git show v0.1.0

Step 4: Create GitHub Remote and Push

Create empty repo learning-notes on GitHub (no auto README if you already have local commits).

bash
git remote add origin git@github.com:YOUR_USER/learning-notes.git
git push -u origin main
git push origin v0.1.0

Confirm on GitHub: commits, tag, and .gitignore present.

Step 5: Simulate Daily Habit

Practice loop:

bash
git pull
git switch -c feature/day2
# edit files
git add .
git commit -m "docs: add day 2 notes"
git push -u origin feature/day2

Open PR on GitHub—even solo repos benefit from PR habit—or merge locally if practicing offline.

Checklist

  • At least 3 commits on main
  • One merged feature branch visible in git log --graph
  • .gitignore excludes node_modules/ or target/
  • Tag v0.1.0 on remote
  • README explains project purpose

Extensions

FAQ

Push rejected on first push?

Remote not empty—use empty repo or pull --allow-unrelated-histories.

Forgot .gitignore before commit?

Add file, git rm -r --cached node_modules if already tracked.

Private or public repo?

Public fine for learning notes without secrets; private for employer code.

Delete and restart?

Keep folder, remove .git, git init—or delete remote repo and re-push.

Tag not on GitHub?

Run git push origin v0.1.0 explicitly.

Solo PR worth it?

Yes—builds muscle memory for team work in next project.