Let's think about it this way for a second
In this section, we'll revisit Git's core workflow using a real project. We'll start from a brand-new folder called portfolio-site and create a local repository with git init. Then we'll put Git's three states (Working Directory, Staging Area, Repository) into practice with actual files and start building up our commit history. We'll keep expanding this project in Part 2 and Part 3 with branches, merges, and remotes, so it's important to get this foundation solid first.
Let's build it for real
First, create a new folder called portfolio-site and run git init inside it. Then create two files: index.html (a simple HTML page with your name and a short bio) and README.md (a description of the project). Add a .gitignore file too, to ignore node_modules/ and .DS_Store. Check the untracked files with git status, then stage them with git add .. Finally, commit with the message 'Initial commit: project structure' and view the history with git log.
Code Example
# Step 1: project folder ဖန်တီးပြီး Git repository initialize လုပ်ပါ
mkdir portfolio-site
cd portfolio-site
git init
# Step 2: files များ ဖန်တီးပါ
echo "# My Portfolio Website" > README.md
echo "<html><body><h1>Hello, I'm a developer</h1></body></html>" > index.html
# Step 3: .gitignore file ဖန်တီးပါ
printf "node_modules/\n.DS_Store\n*.log\n" > .gitignore
# Step 4: status စစ်ပြီး stage လုပ်ပါ
git status
git add .
# Step 5: commit လုပ်ပါ
git commit -m "Initial commit: project structure"
# Step 6: history ကြည့်ပါ
git log --onelineAfter running git log --oneline, a commit called 'Initial commit: project structure' shows up in the history.Try it in 5 minutes
Add one more paragraph tag to index.html and practice the git status → git add → git commit workflow again (5 minutes).
A quick word of caution
Always write clear commit messages — later, when you're looking back through the history, a message like 'Initial commit: project structure' tells you far more about what actually happened than something like 'update'.