Labs
Practise on the real thing
Missions teach in the browser; labs make it real: Git Bash on a Windows PC and your own repositories on github.com.
How labs work
Missions run in your browser. Labs run on a real computer and the real github.com, the way you will use Git at work. Each lab has steps, a checklist, and something to submit (usually a link) so your teacher can check it.
On a shared lab computer
- Set your name and email without
--global, inside your own project folder. - When you finish, remove your saved GitHub sign-in: Control Panel → Credential Manager → Windows Credentials → remove entries starting with
git:https://github.com. - Sign out of github.com in the browser.
Unit 1 lab: Set up Git and GitHub
Time: 60 minutes · Needs: a Windows PC, an email address, your phone (for two-factor authentication)
- Install Git for Windows from git-scm.com, following the installer choices in Unit 1: editor Notepad, initial branch main.
- Open Git Bash and check the version:
$ git --version
- Tell Git who you are. On your own laptop use
--global; on a lab PC, skip--globaland do it inside your project folder later.
$ git config --global user.name "Your Name"$ git config --global user.email "you@example.com"$ git config --list
- Practise asking Git for help: run
git help,git help commitandgit commit -h. Write down one thing you learned from each. - Create your GitHub account with the same email, a professional username, and two-factor authentication turned on. Store your recovery codes safely.
Checklist
-
git --versionprints a version number -
git config --listshows your name and email - GitHub account created, email verified, 2FA turned on
- Profile photo and bio added
Submit: your GitHub profile link, e.g. https://github.com/krish-patel.
Lab L-01: Your profile README
GitHub shows a special README on your profile page, like a developer business card.
- On GitHub click + → New repository.
- Name the repository exactly your username (for example
krish-patel). GitHub shows: "You found a secret!" - Make it Public, tick Add a README file, and click Create repository.
- Click the ✏️ pencil on
README.mdand write about yourself in Markdown:
# Hi, I'm Krish 👋
- 🎓 BCA student at SBCCAS, Amroli, Surat
- 💻 Learning: Git, GitHub, Python, web development
- 🍽️ Building: Amroli Canteen, a canteen pre-order app
- 📫 Reach me: krish@example.com- Click Commit changes…, write a message such as
Add profile introduction, and commit. - Open your profile page (
github.com/<your-username>). Your README now appears at the top.
Submit: your profile link.
Unit 2 lab: Your first project on GitHub
Time: 90 minutes · Needs: Git Bash, your GitHub account
Part A: local first, then push
- Create a project and make three separate commits:
$ cd ~/Desktop$ mkdir my-first-repo$ cd my-first-repo$ git init$ echo "# My First Repo" > README.md$ git add README.md$ git commit -m "Add README"$ echo "I am a BCA student at SBCCAS." > about-me.txt$ git add about-me.txt$ git commit -m "Add about me"$ echo "Hobbies: cricket, coding" >> about-me.txt$ git commit -am "Add hobbies"$ git log --oneline
- On github.com create a new, empty repository named
my-first-repo. Do not add a README. - Connect and push. Git Credential Manager opens a browser window: sign in to GitHub there.
$ git remote add origin https://github.com/<your-username>/my-first-repo.git$ git push -u origin main
- Refresh the GitHub page. Your three files and three commits are online.
Part B: clone, change, pull
- Clone your own repository into a second folder. This pretends to be a teammate's laptop:
$ cd ~/Desktop$ git clone https://github.com/<your-username>/my-first-repo.git teammate-copy$ cd teammate-copy$ echo "Favourite subject: Git & GitHub" >> about-me.txt$ git commit -am "Add favourite subject"$ git push
- Go back to the first folder and get the change:
$ cd ~/Desktop/my-first-repo$ git fetch$ git status$ git pull$ cat about-me.txt
Checklist
- Repository has at least 5 commits, each with a clear message starting with a verb
-
git statusin both folders says up to date and working tree clean - You can explain the difference between
fetchandpullin one sentence
Submit: your repository link, e.g. https://github.com/krish-patel/my-first-repo.
Unit 3 lab: Branches and a real conflict
Time: 90 minutes · Needs: Git Bash, a partner, the my-first-repo repository from the Unit 2 lab
Part A: feature branches on your own
$ cd ~/Desktop/my-first-repo$ git switch -c feature-skills$ echo "Skills: C, Python, Git" >> about-me.txt$ git commit -am "Add skills"$ git switch main$ git switch -c feature-goals$ echo "Goal: become a full-stack developer" > goals.txt$ git add goals.txt$ git commit -m "Add career goal"$ git switch main$ git merge feature-skills$ git merge feature-goals$ git log --oneline --graph --all$ git branch -d feature-skills feature-goals$ git push
Write down which merge was a fast-forward and which created a merge commit, and why.
Part B: cause and resolve a conflict with a partner
- Partner A adds Partner B as a collaborator: on GitHub, Settings → Collaborators → Add people. B accepts the invitation email.
- Both clone A's repository (A can use the existing folder).
- Both edit the same line of
README.md(for example, change the title), commit, and push. - The second person's push is rejected. They run
git pull, which reports a CONFLICT. - Open
README.md, agree on the final title together, delete the markers, then:
$ git add README.md$ git commit -m "Resolve README title conflict"$ git push
- The first person runs
git pullto get the resolved version.
Checklist
-
git log --oneline --graphshows at least one merge commit - Your partner's repository shows the conflict-resolution commit
- No
<<<<<<<markers are left in any file - Merged feature branches are deleted
Submit: both repository links and a screenshot of git log --oneline --graph.
Unit 4 lab: Detective, stash, tag and undo
Time: 90 minutes · Needs: Git Bash and your my-first-repo
- Detective. Answer these with Git commands and write down the command you used:
- How many commits does the repository have? (
git log --oneline) - Which commits changed
about-me.txt? (git log --oneline -- about-me.txt) - What exactly changed in your second commit? (
git show HEAD~N) - Which commits did your partner make? (
git log --author="…")
- How many commits does the repository have? (
- Stash. Start editing
goals.txt(don't commit). Stash it, fix a typo inREADME.mdand commit, thengit stash pop. Commit the goals change. - Tag a release and push it:
$ git tag -a v1.0 -m "First complete version"$ git push origin v1.0
On GitHub, open the Tags list to see it. 4. Undo three ways:
- Edit a file, then throw the edit away with
git restore <file>. - Make a commit you don't push, then remove it with
git reset --soft HEAD~1and commit it again with a better message. - Push a commit that adds a silly line, then undo it with
git revert HEADand push. Look at the history on GitHub: both commits are there.
Checklist
- Written answers to the four detective questions, with commands
- Tag
v1.0visible on GitHub - A
Revert "…"commit visible on GitHub
Submit: your repository link and the detective answers.
Lab L-02: Create and configure a repository
Time: 30 minutes · Unit 5
- + → New repository, name
canteen-menu, description "Menu for the Amroli Canteen app", Public, tick Add a README, choose the .gitignore template Python and the MIT License. Create it. - Explore the page: find the Code button, the commits link, the branch menu and the Settings tab.
- Edit
README.mdin the browser (✏️): add a list of three menu items, commit with a clear message. - Clone it to your computer, add
menu.txt, commit and push. Refresh GitHub to see the file. - In Settings → Collaborators, add a classmate. They accept the invitation.
- Optional: Settings → Branches → Add rule for
main: Require a pull request before merging. - Tag a release:
git tag -a v0.1 -m "First menu"andgit push origin v0.1, then on GitHub Releases → Draft a new release from tagv0.1.
Checklist
- README,
.gitignoreandLICENSEexist - At least one commit made in the browser and one pushed from your computer
- A collaborator has been added
- Release
v0.1is visible
Submit: the repository link.
Lab L-03: Report and fix an issue
Time: 30 minutes · Unit 5 · work in pairs, using each other's canteen-menu repositories
- Partner A opens an issue on B's repository (Issues → New issue). Use this template:
**Title:** Tea price missing from menu
**Steps:** Open menu.txt.
**Expected:** Tea 10 is listed.
**Actual:** Tea is not on the menu.- B adds the label bug and assigns the issue to themself.
- B fixes it on their computer and closes the issue from the commit message (use the issue's number):
$ git pull$ echo "Tea 10" >> menu.txt$ git commit -am "Add tea to menu (fixes #1)"$ git push
- Refresh the issue: it is closed and links to the commit. Swap roles.
Submit: the link to the closed issue.
Lab L-04: Fork and pull request
Time: 60 minutes · Unit 5 · uses the class practice repository your teacher created (for example sbccas/git-practice-2026)
- Open the class repository and read
CONTRIBUTING.md. - Click Fork: you now have
<your-username>/git-practice-2026. - Clone your fork, add the original as
upstream, and create a branch:
$ git clone https://github.com/<your-username>/git-practice-2026.git$ cd git-practice-2026$ git remote add upstream https://github.com/sbccas/git-practice-2026.git$ git remote -v$ git switch -c add-<your-username>
- Add your profile card. Change only your own file, so pull requests don't conflict:
$ echo "# <Your Name>" > students/<your-username>.md$ echo "- Programme: BCA / BCA AI / BSc DS / MSc IT" >> students/<your-username>.md$ echo "- Favourite Git command: git status" >> students/<your-username>.md$ git add .$ git commit -m "Add <your-username> profile card"$ git push -u origin add-<your-username>
- On GitHub, click Compare & pull request. Check that the base repository is the class repository and base is
main. Write a clear title and description, then Create pull request. - Your teacher reviews it. If changes are requested, edit, commit and push again to the same branch. The PR updates automatically.
- After it is merged, update your fork:
$ git switch main$ git pull upstream main$ git push
Checklist
- Your fork exists and has an
upstreamremote - Your PR changes only
students/<your-username>.md - The PR has a clear title and description
- After merging, your fork's
mainis up to date
Submit: the link to your pull request.