1. The developer workflow
This is how real teams work every day:
- Keep
mainworking and clean. - Start each new feature on its own branch.
- Commit small, clear steps.
- Merge the feature back into
mainwhen it is ready. - Check
git statusandgit logto make sure everything is saved.
On a real project you would then git push your repo to GitHub, so your team (and the world) can see it, review it and deploy it. This practice terminal has no internet, but the workflow is exactly the same.
You also get one handy shortcut: git commit -am "msg" stages every already-tracked changed file and commits in one go (new files still need git add).
Challenge: Final: ship the chai stall website
Build and ship the site from an empty home folder. Your checklist:
- Set your name with
git config user.name "…". - Make
~/chai-sitewith acssfolder inside, and go intochai-site. - Create
index.htmlcontainingAsha's Chai Stallandcss/style.css(any CSS). git init, add everything, and make the first commit.- Create a branch
diwali-menu; on it createmenu.txtwithKaju katli ₹40and commit. - Switch back to
main; add a line containingOpen 7am to 9pmtoindex.htmlwith>>, and commit. - Merge
diwali-menuintomain(a merge commit), then checkgit log --onelineandgit status.
The tests check: the repo at ~/chai-site, your name set, at least 4 commits on main, the merge commit, the merged branch, index.html with the hours, menu.txt with kaju katli, css/style.css committed, and a clean status.