Ravindra BagaleCourses & study guides

Chapter 2: Git Fundamentals

2.10 Lab — three meaningful commits

Lab

Build a tiny hello API repo for Instagram-style badge API . Use Python or Node — your choice.

  1. git init in a new folder (or clone devops-shipit-labs and create a subfolder).
  2. Commit 1: add the hello app file that returns a simple response.
  3. Commit 2: add .gitignore (include .env, dependency folders, *.pem).
  4. Commit 3: add README.md with how to run the app locally in five lines or fewer.
  5. Show git log --oneline — you should see three clear messages.
  6. Create a local .env with a fake secret and confirm git status ignores it.

Optional: git clone your empty GitHub devops-shipit-labs and push when you know git remote / git push from the next chapter or a short GitHub guide. If push is new, stop after local commits — that still completes this lab.

Practice task

List three files that should almost never be committed in a web API project, and the .gitignore pattern for each.

Thodkyaat sangaycha tar

  • Git stores history; GitHub hosts it — they are not the same thing.
  • Flow: working tree → git add (staging) → git commit → git log.
  • Always git status before git add .; use .gitignore for .env, keys, dependencies.
  • git restore for safe local undo; amend only if not pushed to a shared branch.
  • Commit messages: short, imperative, one clear idea — three good commits beat one messy dump.

Samajla ka? Nasel tar staging area (2.5) aani .gitignore (2.6) punha vacha – status baghtun add karaychi savay lavun ghya. Aata pudhe jaauya branching, merge aani GitHub pull requests.