Techmiya Tutorials Certification:Complete all 100 Git & GitHub units + 15 Practical Labs + score 31/50 on Final Assessment to earn verified PDF certificate!Take Assessment
Hands-On Engineering Practice
Interactive Practical Labs
Complete these 15 industry-grade simulated lab scenarios. Every lab includes starting state, commands, expected outputs, verification steps, and troubleshooting.
Labs Completed
0 / 15
All 15 required for certification
Lab #1•Fundamentals•Beginner
Create a Repository and Make the First Commit
Scenario & Objective:
You are starting a brand new portfolio project 'my-portfolio' and want to initialize a Git repository to version control your project from day one.
Prerequisites:
- •Git installed
- •User name and email configured (`git config --global user.name` & `user.email`)
Starting State:
An empty directory named `my-portfolio` with no prior Git initialization.
Interactive Step-by-Step Command Walkthrough
Step 1: Creates a project folder and enters it.
Terminal Step #1
mkdir my-portfolio && cd my-portfolioStep 2: Initializes a hidden `.git` folder that tracks repository history.
Terminal Step #2
git initExpected Output / State:
Initialized empty Git repository in /Users/dev/my-portfolio/.git/
Step 3: Creates an initial README markdown file in the working directory.
Terminal Step #3
echo '# My Portfolio' > README.mdStep 4: Checks file states; shows README.md as untracked in red.
Terminal Step #4
git statusExpected Output / State:
On branch main No commits yet Untracked files: (use "git add <file>..." to include in what will be committed) README.md nothing added to commit but untracked files present (use "git add" to track)
Step 5: Moves README.md from working directory into the staging area (index).
Terminal Step #5
git add README.mdStep 6: Records snapshot of staged changes into permanent Git history.
Terminal Step #6
git commit -m "feat: initial commit with README"Expected Output / State:
[main (root-commit) 4a7c19f] feat: initial commit with README 1 file changed, 1 insertion(+) create mode 100644 README.md
Expected Result & Verification:
A clean Git repository on branch `main` with 1 commit in history.
Verification Checklist:
- ✓Run `git status` -> Should output 'nothing to commit, working tree clean'.
- ✓Run `git log --oneline` -> Should display commit hash `4a7c19f` and message 'feat: initial commit with README'.
Troubleshooting Common Lab Gotchas
Issue: Author identity unknown error during commit.
Solution: Run `git config --global user.email 'you@example.com'` and `git config --global user.name 'Your Name'`.
Issue: Branch defaults to 'master' instead of 'main'.
Solution: Run `git branch -M main` or configure default: `git config --global init.defaultBranch main`.
Completion Criteria: Repository initialized, README staged, and root commit recorded cleanly.
