AI Learning Hub › Learn AI › Self-Paced Courses › GitHub Without the Jargon › Make Your First Change

Module 3 ยท Beginner

Make Your First Change

Edit a file in the browser, see what changed before recording it, write a commit message, and watch the commit appear in history.

By the end

  • Edit a file in GitHub’s browser interface
  • Explain the difference between editing and committing
  • Write a useful commit message
  • Recognize what changed before recording it
  • Explain how the commit appears in repository history
  • Distinguish a saved-looking editor state from a recorded repository change
  • Understand why this one direct-to-main commit is a practice exception

Until now, nothing changed

Three modules, one arc. Module 1 asked what is this repository? Module 2 asked how do I explore it without changing it? This module asks the question that follows: when does an edit become part of the project’s history?

Everything in Module 2 was safe because none of it created a commit. Opening a repository, opening a folder, opening a file, reading history, opening the branch menu — the project was exactly as you found it when you left.

Now we are going to alter one file and deliberately record that change.

This is the moment GitHub stops being something you are only reading.

The distinction that carries the whole module:

Editing changes the draft. Committing records the change.

Three words to learn

Edit

A change to a file’s contents before that change is recorded in a commit.

Commit message

A short description saved with a commit to explain the change.

Diff

A view showing what was added, removed, or changed between versions.

Beginner versions, as before. Still not needed: staging, working tree, index, SHA, hash, push, remote, checkout, merge, and pull request. main appears throughout because it is the default branch of the repository we are using; what branches actually do is still Module 4.

Practice somewhere that does not matter

Practice repository — not a Stanford project.

Everything below happened in a repository created for this course and nothing else: github-without-the-jargon-practice. It is private and deliberately disposable, and at this point in the exercise it had a single owner.

That matters because of what it was not, at this point in the exercise:

A first commit should not also be your first experiment on something important.

This is not a security policy. It is the same practical instinct that makes you try an unfamiliar feature on a copy of a document rather than the filed version.

The before state

Recorded before anything was touched, so that the effect of the change can be checked against it rather than assumed:

Repository
github-without-the-jargon-practice, private
Branch
main — 1 branch, 0 tags
Files
README.md, and nothing else
History
1 commit

This is our before state. Write yours down too. It is the only way to tell later whether one thing changed or three did.

The pencil changes your mode

Open README.md, then select the pencil control in the file’s toolbar. The page becomes an editor: the file name moves into a text box, the tabs change to Edit and Preview, and two buttons appear at the top right — Cancel changes and Commit changes…

At this point:

The interface says so itself, if you look. On the freshly opened editor, before typing anything, Commit changes… is grayed out and cannot be clicked. There is nothing to record yet. Type one character and it turns green. Opening the editor is an action, but it is not yet a commit.

One small change

The whole change is three lines added to the end of README.md:

added to the end of README.md
## Status

Current status: Ready for review.

Small on purpose. A first commit should be something you can check completely in a few seconds.

The change exists in the editor — not yet in history

Before finalizing anything, look at what GitHub is showing you. The editor has two tabs:

Edit
The file as plain text, with line numbers, exactly as it will be stored.
Preview
The same file rendered — so a Markdown heading appears as a heading rather than as ## Status.

The file has been modified in the editor. The repository has not gained another recorded commit. Both things are true at once, and holding them together is the point of this module.

Ask “what changed?” before “save it”

The Preview tab carries a checkbox labeled Show diff. Turning it on marks the changed parts of the rendered file with a colored bar in the left margin, leaving everything unchanged plain. Two paragraphs of the README were untouched; only the new heading and its sentence are marked.

After the change is recorded, GitHub shows the more familiar form — the commit’s own diff, line by line:

the recorded commit’s diff — 1 file changed, +4
@@ -1,3 +1,7 @@
 # github-without-the-jargon-practice

 Disposable practice repository for...
+
+## Status
+
+Current status: Ready for review.

A diff focuses on the difference rather than showing you the entire file as if everything changed. Three lines were already there and are shown plain; four lines are new and are marked.

Only what you need from the symbols today. Additions may be shown with +; removals may be shown with -. That is enough. Module 6 uses diffs properly, for reviewing someone else’s proposed change.

Give the change a useful name

Selecting Commit changes… opens a dialog with a Commit message field and an optional Extended description. The description was left empty.

A commit message should help a future reader understand the purpose of the recorded change. Compare:

Poor

update

True of almost every commit ever made. Tells a future reader nothing.

Better

Add status section to README

Names what was added and where. Someone scanning the history can skip it or open it on purpose.

The message is the label attached to the change in history rather than the change itself.

The message field arrives pre-filled, and that is new. In the interface observed for this module, GitHub had already written a commit message before the field was touched, with a line underneath reading “Message and description suggested by Copilot.” The suggestion was accurate, and it is the message this repository now carries.

Treat a suggested message as a draft, not a decision. It describes what the code changed; only you know why. Read it, and replace it when the reason matters more than the mechanics — which, in a shared project, is most of the time.

Why are we committing directly to main?

The dialog offers two destinations, and this is the interesting part of the screen:

Selected by default

Commit directly to the main branch

The change lands immediately in the version everyone sees first.

The other option

Create a new branch for this commit and start a pull request

The change is recorded somewhere else, and proposed.

GitHub’s own editing documentation currently recommends the second one. Its words: “If your current branch is the default branch, you should choose to create a new branch for your commit and then create a pull request.”

We chose the first anyway, deliberately, because:

This is a teaching exception rather than our collaboration workflow.

GitHub does the same thing for the same reason: its own beginner tutorial for creating a first repository tells the reader to “keep the default option to commit directly to the main branch.” Two GitHub documents, two different recommendations, both correct — because one is teaching a mechanism and the other is describing collaborative practice.

Module 4 exists because important or shared work should not require every experiment to alter the default branch immediately. You have now felt the problem from the inside: the change you just made was visible to anyone opening that repository the instant you clicked the button. There was no moment in between.

GitHub's Commit changes dialog. A field labeled Commit message contains the text Add status section to README, with a small refresh icon at its right edge. Below it a larger empty box is labeled Extended description with placeholder text reading Add an optional extended description. A line under the box reads Message and description suggested by Copilot. Beneath that are two radio buttons: the first, selected, reads Commit directly to the main branch; the second reads Create a new branch for this commit and start a pull request, with a link below it reading Learn more about pull requests. At the bottom right are a Cancel button and a green Commit changes button.
The last screen before the project changes. Observed on GitHub on 21 September 2026, in the private practice repository. Cropped to the dialog. Open full-size image: the commit dialog before the change was recorded (opens in a new tab)

Observed on GitHub

Verified: 21 September 2026.

This is the disposable practice repository described above, and this is the moment immediately before the commit was recorded — message written, destination chosen, nothing saved yet. Selecting the green button is what turns the draft into history.

GitHub may change these labels and this layout, and not every account sees exactly the same dialog: an account with more than one verified email address also gets a menu for choosing which address to record as the author. Where your screen differs, your screen is right.

Now the project remembers it

The same two states, side by side:

Before

  • README.md, 3 lines;
  • no Status section; and
  • 1 commit.

After

  • the same README.md, 7 lines;
  • Status section added; and
  • 2 commits.

The file changed once. The history gained one new recorded point.

That new point is a commit, in exactly the sense Module 1 introduced it: a recorded snapshot of changes at a particular moment, carrying which files changed, when, who recorded it, and a message describing it. Module 1 defined the word. This is the first one you made.

A commit carries context

The most common beginner mistranslation is commit means save. It is close enough to be useful and wrong enough to be worth correcting.

A normal Save in most applications primarily updates the current document. A commit records a change as part of repository history, and associates information with it:

Think “record this change” rather than merely “save this file.”

GitHub also gives each commit its own identifier, which appears beside it as a short string of letters and numbers. You do not need it yet. It is how tools refer to one exact point in history; nothing in this course asks you to read one.

A commit does not freeze the file forever

Recording a change does not close the file. README.md can be edited again tomorrow, and that edit can become another commit, and the history grows by one more point. Nothing about committing is final in the sense of finished.

There are ways to adjust or undo recorded history, and they are genuinely useful. They are also the part of Git that most reliably confuses people, so this course introduces them only when there is a reason to.

Try a tiny change in a repository you own

If you want to follow along, use a disposable repository that you own and that contains no important work. A repository you created to try something, or one you make now for the purpose, is ideal.

  1. Open a small text or Markdown file. A README is the obvious candidate.
  2. Enter the editor. Note that the commit control is unavailable until you change something.
  3. Make one tiny, understandable change. One line. Resist improving three things at once.
  4. Preview or review the change. Confirm you changed what you meant to and nothing else.
  5. Write a specific commit message. If one is suggested for you, read it before accepting it.
  6. Decide where the commit is going. Read the destination options rather than clicking past them.
  7. Commit.
  8. Inspect the resulting history. Confirm the count went up by exactly one, and that the diff shows only your change.

For important or collaborative repositories, do not assume committing directly to the default branch is appropriate. On a shared project it often is not, and on some repositories it is not even permitted. Branches are next.

At what point did the repository change?

Eight steps, in order. Decide which one actually added a new recorded point to the repository’s history.

one browser edit, step by step
A. Open README.md
B. Click the edit control
C. Type the new Status section
D. Preview the file
E. Open the commit dialog
F. Enter a commit message
G. Finalize the commit
H. Open history
One possible answer

G — finalizing the commit.

A through F prepare, inspect, or describe the proposed change. Every one of them can be abandoned by closing the tab, and the repository is untouched.

H inspects the history after it exists. Opening history never creates history, which is the Module 2 point arriving again from the other side.

Notice how much of the work happens before anything is recorded. Six of the eight steps are reversible by walking away. That ratio is not an accident — it is the interface giving you room to change your mind.

Which message will help later?

Four candidate messages for the same change. Which gives a future reader the clearest clue about what was done?

four messages for one change
update
stuff
README
Add practice status
One possible answer

Add practice status — it is the only one that says what happened.

  • update is true of nearly every commit and so distinguishes nothing.
  • stuff says less than nothing; it signals that the author did not want to think about it.
  • README names the file but not the change. A history of twelve commits all reading README is unreadable.

There is no universal perfect commit-message formula, and teams differ about style, length, and tense. The useful principle survives all of that: describe the purpose of the recorded change clearly enough that the history remains understandable to someone who was not there — including you, in six months.

What to notice

A browser edit has stages, and they are worth separating in your head because the interface separates them too.

Edit

Change the file.

Review

Check what you mean to record.

Describe

Give the commit a useful message.

Commit

Record the change in repository history.

Until the commit you have a proposed edit; after it, the repository has new history.

Before you continue

You are ready for Module 4 if you can: