Running Project: my-notes
Starting state: Git installed, name and email configured (Part 1 complete).
Ending state: my-notes/ folder on your machine. One file. One commit. One entry in git log. This exact state is the foundation for every future part.
Step 1 — Create the Project Folder
Why: Git tracks a folder. We need a clean, dedicated folder for the my-notes project — not the Desktop, not Downloads. A predictable location you can always find.
Commands:
mkdir my-notes cd my-notes
Expected output: No output. Silence is success in the terminal — an error would print a message; no output means the command ran cleanly.
Self-check: Your terminal prompt now shows my-notes in the path.
- Git Bash:
MINGW64 ~/my-notes $ - Mac/Linux:
yourname@machine:~/my-notes$
Step 2 — Initialize Git
Why: An ordinary folder has no history. git init creates the hidden .git subfolder — Git's entire database for this project. After this command, Git starts watching this folder. Before it, Git ignores this folder completely.
Command:
git init
Expected output:
Initialized empty Git repository in /home/yourname/my-notes/.git/
The path reflects your actual home directory. On Windows via Git Bash: C:/Users/YourName/my-notes/.git/.
Verify .git exists:
ls -a # Mac / Linux / Git Bash ls -Force # Windows PowerShell
Expected output (excerpt):
. .. .git
The .git folder is hidden by default — the dot prefix means "hidden." The -a / -Force flag makes hidden items visible.
Self-check: The .git folder appears in the listing. No error from git init.
Step 3 — Create Your First File
Why: Git tracks files, not empty folders. We need at least one file to stage and commit. The content matters — this note will persist in the repository history permanently.
Using a text editor (recommended): Open Notepad (Windows), TextEdit (Mac), or any code editor. Create a new file named notes.txt inside the my-notes folder. Type this exactly and save:
Day 1: Learning Git with RR Skillverse.
Alternative — using the terminal:
# Mac / Linux / Git Bash: echo "Day 1: Learning Git with RR Skillverse." > notes.txt
Verify the file and its content:
cat notes.txt # Mac / Linux / Git Bash type notes.txt # Windows Command Prompt
Expected output:
Day 1: Learning Git with RR Skillverse.
Self-check: The file exists in the my-notes folder. The content matches exactly.
Step 4 — Check What Git Sees
Why: Before staging anything, always run git status first. It shows you exactly what Git knows about the current state of the folder — and right now, it sees notes.txt but isn't tracking it yet.
Command:
git status
Expected output:
On branch main
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
notes.txt
nothing added to commit but untracked files present (use "git add" to track)
Note on "main" vs "master": If your output shows On branch master, your Git version is older than 2.28. Both work identically — only the branch name differs.
Read the output: "Untracked" does not mean Git can't see the file — Git listed it. It means Git has chosen not to include it in snapshots yet. You haven't told it to. Nothing is lost or wrong; Git is waiting for your instruction.
Self-check: notes.txt appears under "Untracked files." No error messages.
Step 5 — Stage the File
Why: Staging is how you tell Git "include this in the next snapshot." The commit will contain exactly what you stage — nothing more. This two-step process (add, then commit) is intentional: it lets you compose precise commits even when multiple files have changed.
Command:
git add notes.txt
Expected output: No output. Silence = success.
Now run git status again:
git status
Expected output:
On branch main
No commits yet
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: notes.txt
Read the difference: notes.txt moved from "Untracked files" to "Changes to be committed." The label changed from untracked to new file. It's in the staging area — queued for the next commit, but not yet committed.
Self-check: notes.txt appears under "Changes to be committed" with the new file: label.
Step 6 — Make Your First Commit
Why: This is the snapshot. After this command, Git permanently records the current state of notes.txt with your name, email, timestamp, and message attached. This commit will exist in the history forever — it cannot be edited, only built upon.
Command:
git commit -m "Add initial notes file"
Expected output:
[main (root-commit) a3f7b21] Add initial notes file 1 file changed, 1 insertion(+) create mode 100644 notes.txt
Read the output:
main— the branch this commit landed onroot-commit— this is the first commit in the repository; it has no parenta3f7b21— the first 7 characters of this commit's unique ID (your hash will differ — every commit hash is globally unique)1 file changed, 1 insertion(+)— one file added, one line inserted
Self-check: Output shows a commit hash, the word root-commit, your message, and the file stats. No error messages.
Step 7 — View the History
Why: git log is your timeline. Every commit you ever make will appear here, newest first. This is how you answer "what changed, when, and who made it happen." Get comfortable reading this output; you'll use it constantly.
Command:
git log
Expected output:
commit a3f7b21c9e4d5f8b1a2c3d4e5f6789012345678 (HEAD -> main)
Author: Your Full Name <your@email.com>
Date: Thu Aug 7 14:23:45 2026 +0530
Add initial notes file
Pager note: Git opens git log in a pager (press q to return to the prompt). Prefer a compact view? Use:
git log --oneline
a3f7b21 (HEAD -> main) Add initial notes file
Read the output:
commit a3f7b21c...— the full 40-character SHA-1 hash uniquely identifying this commit(HEAD -> main)— HEAD means "where you are right now"; it's pointing at the latest commit onmainAuthor— your name and email fromgit config(set in Part 1); this is why that step came firstDate— the exact timestamp of yourgit commitcommand
Self-check: The Author field shows your configured name and email exactly. The commit message matches what you typed. The hash is 40 characters long.
State of my-notes at the End of This Post
my-notes/ └── notes.txt ← "Day 1: Learning Git with RR Skillverse." Git history: 1 commit on main a3f7b21 Add initial notes file (your hash will differ)
Part 3 will start exactly here — with this folder, this file, and this one commit in the log. Do not delete or modify my-notes/ between parts.