CCommons

I learned git in class 11 so my notes would stop being "final_final_v3_REAL"

Ten commands, one near-disaster, and the thing that saved me when I deleted three days of work.

Rohan Sharma11th Sample

11 Oct 2026 ยท 4 min read

Photo: Jacek Halicki ยท CC BY-SA 4.0 ยท via Wikimedia Commons

Quick confession. My phone has a folder called "physics notes". Inside it: kinematics.docx, kinematics_final.docx, kinematics_final2.docx, kinematics_FINAL_real.docx and kinematics_final_real_USE_THIS.docx. I do not know which one has the correct sign convention. Nobody knows. It's like a murder mystery where I'm also the victim.

Kabir (yes, that Kabir, the Pomodoro guy) told me about git in a message one night. "It's version control. It keeps the history of your files, so you never need final_final." I said "bro I'm in class 11" and he said "that's exactly why". So I spent the week learning it. It was surprisingly not scary. Here's what I know now, which isn't a lot, but it's enough to stop the docx madness.

What git actually is

Git is a program that watches a folder and lets you take snapshots (called commits) of it. Each snapshot has a message you write. You can go back to any snapshot. You can also try something risky on a separate branch and throw it away if it goes wrong.

It does NOT need the internet. It's on your own laptop. GitHub is a different thing, a website where you can store a copy of your git folder online. Git is the tool. GitHub is one place to put the result. I mixed these up for two days.

The commands I actually use

I switched my notes to plain text (Markdown files), because git can show differences between versions of text easily, but not really of a docx. Then:

mkdir study-notes
cd study-notes
git init

git init turns the folder into a git folder. One time only.

git add kinematics.md
git commit -m "kinematics: add equations of motion"

add says "include this file in the next snapshot". commit takes the snapshot with a message. Write the message so you can understand it in 3 months. My first commit message was "asdf". Do not do that.

git status
git log --oneline

status tells you what changed. log --oneline shows your snapshots, newest first:

e41b7d2 kinematics: fix wrong sign in v^2 = u^2 + 2as example
a3f9c21 kinematics: add equations of motion

Look at the top one. That's the sign convention mystery from my docx folder, solved and permanently written in history.

git diff

Shows exactly which lines changed since the last snapshot, with plus and minus signs. I use it before every commit and it's weirdly satisfying.

git restore kinematics.md

Throws away my unsaved edits to that file and goes back to the last commit. Careful, this one is destructive. The edits are gone.

Branches: the "what if" button

Before a big change, like reorganising all my notes by chapter, I make a branch:

git switch -c mock-test-mistakes
# edit things, commit things
git switch main
git merge mock-test-mistakes

If the experiment is bad, I just switch back to main and the main notes are untouched. It's like a save-game in a video game, except I can have many.

The near-disaster

Last Saturday I made three commits of new rotational motion notes. Then I wanted to undo only the last one and typed:

git reset --hard HEAD~3

I typed 3 instead of 1. The notes of the whole afternoon were gone from my folder. I just sat there. Heart rate: unscientific.

Then I remembered Kabir saying "git remembers more than you think". I ran:

git reflog

It prints a list of where I've been, even the places I "deleted", each with a short code. I found the one from before my reset and typed:

git reset --hard a3f9c21

(Not the real code, but you get it.) Everything came back. Lesson: if you committed your work, it's very hard to lose it. If you had edits that were not committed and then ran reset --hard, those are gone for real. So commit often. Small commits. Ten a day is fine.

Two things to keep out

Make a file called .gitignore and list things git should ignore:

*.pdf
scans/
.DS_Store

Reason: big PDFs and photos of handwritten pages make the folder huge and slow. And if you ever put a copy on GitHub, keep it private and never commit anything with your phone number, school ID, passwords or keys. Once something is in the history, deleting the file later doesn't remove it from the old snapshots.

What I still don't get

  • Merge conflicts. I made one on purpose and it looked like a ransom note in my file.
  • What rebase is. Kabir said "later". Ok.
  • Why people say "pull request" like it's a big deal.

Was it worth it?

Honestly yes. Now my notes have a history. I can see when I fixed something and why. When I'm revising, git log is like a timeline of what I learned in which week. It also made me write smaller, cleaner notes, because each commit should be about one thing.

Is it more studying? No. Is it less panic at 11 pm when a file vanishes? Absolutely.

Now if you'll excuse me, I need to commit this post.

WhatsAppPost on X

12 responses

Sign in to join the conversation.

  • [+]Kabir Joshi11thSampleยท 8d ago

    I am a proud teacher, my first student has made the exact "typed 3 instead of 1" mistake. A good habit, before any reset --hard, run git status and git log --oneline first so you can see what you're about to lose. And you did the right thing with reflog. Also when you get to merge conflicts, they look scary but it's just two versions of the same line with markers around them, you pick one ๐Ÿ˜„

  • [+]Pooja Iyer12thSampleยท 8d ago

    wait so git and GitHub are the same thing right? I have a GitHub account because my cousin made one for me

    • [+]Kabir Joshi11thSampleยท 8d ago

      no, different things. git = the tool on your computer. GitHub = a website that stores git projects online. Like how a camera is not the same as an Instagram account. You can use git without GitHub for your whole life.

      • [+]Pooja Iyer12thSampleยท 8d ago

        camera vs instagram, got it ๐Ÿ˜‚ thank you

  • [+]Tushar PawarDropperSampleยท 8d ago

    good first post. One thing to add. git add . adds everything in the folder, including stuff you didn't mean to. Look at git status before each commit, or ask for a patch with git add -p once you're comfortable. Also: commit messages in present tense, like "add torque notes", a lot of people use that style.

    • [+]Rohan Sharma11thSampleยท 8d agoAuthor

      .gitignore does the PDF part! but yes git add . is on my list of things to be afraid of. noted

  • [+]Harsh Gupta12thSampleยท 8d ago

    "Heart rate: unscientific" has me. also you spent a week learning a tool to manage notes and I spent a week finding the notes. we are not the same

  • [+]Aarav Kulkarni11thSampleยท 8d ago

    can I make a rule for myself, like a commit checklist? 1) git status 2) git diff 3) message in a short sentence 4) one topic per commit. Does that sound right or is it too much?

    • [+]Rohan Sharma11thSampleยท 8d agoAuthor

      not too much, that's literally my routine now. status, diff, commit. Add "log" at the end if you want the satisfaction

  • [+]Tanvi Deshmukh12thSampleยท 7d ago

    this is the notes queen speaking: a history of how my notes changed week by week sounds amazing, I'm going to try it with my Biology tables! Do I need to use Markdown for tables? Or does git work with Word files too?

    • [+]Kabir Joshi11thSampleยท 7d ago

      git works with any file, but it only shows you readable line-by-line changes for plain text (Markdown, code, .txt). For Word it stores the whole file each time, so you can go back, but you can't see what changed inside. Markdown tables look like | col1 | col2 | and most note apps render them nicely.

  • [+]Mehak AroraDropperSampleยท 7d ago

    I don't understand git at all but the "save game" idea made me feel calmer about my own notes. I lose files too. thank you for writing this simply ๐Ÿ’›

More from Rohan Sharma