Git Course 0%

The repository page tour

Beginner GitHub UI ≈ 9 min

What you will learn

  • What each tab does and which ones you will actually use
  • How to read the file list, the branch selector and the commit bar
  • The shortcuts that make browsing code fast

After this lesson you can

  • I can find anything on a repository page without hunting

Why this matters

You will spend more time reading repositories than writing in them: checking what a change did, finding the file that documents something, seeing whether a fix shipped. The page is dense, and ten minutes spent learning it saves a great deal of scrolling.

The tabs

Tab What it holds You will use it
Code Files, branches, tags, releases, the README Constantly
Issues Work items and bug reports (lesson 10.6) Often
Pull requests Proposed changes (lesson 10.7) Constantly
Actions Workflow runs and logs (lesson 10.10) When something is red
Projects Boards and tables over issues If your team uses them
Wiki Free-form pages, if enabled (lesson 10.11) Sometimes
Security Advisories, Dependabot, secret scanning Rarely, but know it exists
Insights Contributors, traffic, dependency graph, Network For "what happened here?"
Settings Everything configurable; Admin only When you own it

Tabs can be hidden per repository, so a repository with no Wiki tab has it switched off rather than empty.

The Code tab, part by part

The branch selector, top left of the file list, switches which branch or tag you are looking at. Everything below it, including the README, is that branch's version. Reading a file on a feature branch and thinking it is main is a classic and quiet mistake.

The commit bar above the file list shows the last commit that touched the tree, its author and its status check. Clicking the commit hash opens it; clicking the clock icon opens the full history.

The file list shows, for each entry, the last commit that changed it and when. That is a fast way to spot the file nobody has touched for three years.

The right sidebar carries the description, topics, the licence, and links to Releases (lesson 10.9), Packages and Contributors.

The Code button above the file list holds the clone addresses, HTTPS and SSH, and the Download ZIP option. It is also where Open with GitHub Desktop and Codespaces live.

Inside a file

Opening a file gives you five controls worth knowing:

Control Does
Edit (pencil) Edit in the browser, committing to a branch (lesson 7.8)
Blame Shows which commit last changed each line, and why
History Every commit that touched this file
Raw The plain file, useful for copying or curl
Code / Preview For Markdown, the source or the rendered page

Blame is the single most useful button on the site for a non-developer: it turns "why does the guide say this?" into a commit, a pull request, a discussion and usually an answer.

Four shortcuts

Key Does
t Fuzzy file finder: start typing a filename from anywhere in the repository
. Opens the repository in the web editor (lesson 10.11)
s or / Focus the search box
? The full shortcut list

t is worth learning today. It finds a file in a large repository in about two seconds, which is faster than clicking through directories and much faster than asking.

The repository search box searches this repository; the one in the header searches everything you can see. Two qualifiers cover most needs:

Text
path:docs windows
repo:northwind-trails/trailguide is:issue is:open label:documentation

Code search matches the default branch. If you cannot find a string you know exists, check whether it only exists on a branch.

How to do it

Everything the page shows, Git can tell you locally, usually faster:

Terminal
$ git log --oneline -3 -- docs/getting-started.md
$ git blame -L 20,30 docs/getting-started.md

The advantage of the web page is the link between a line and the pull request that changed it; the advantage of the terminal is speed and no network.

Common mistakes

  • Reading a file on the wrong branch and reporting a bug that was fixed last week.
  • Hunting through folders instead of pressing t.
  • Ignoring Blame, then asking a person what a commit could have told you.
  • Assuming a missing tab means the feature is broken. It is switched off in Settings.
  • Searching code and forgetting that search covers the default branch.

Try it yourself

Goal: answer three questions about a repository using only the page.

  1. Open any public repository you use, or your practice one.
  2. Press t and open README.md without clicking through folders.
  3. Use Blame on one line of it and find the pull request that introduced it.
  4. Switch the branch selector to another branch and confirm the file list changes.
  5. Open Insights → Network and describe the branch shape in one sentence.

Expected result: you found a file by name, traced a line to a discussion, and saw the branch structure without cloning anything.

Show solution

Step 3 is the one to keep. Blame answers "why is this like this" better than any person's memory, because it links the line to the commit, the commit to the pull request, and the pull request to the argument that produced it.

Check yourself

1. You are reading a file on a repository page and it seems out of date. What should you check first?
2. Which control tells you why a specific line says what it says?
3. What does pressing t on a repository page do?

Key terms

Repository (repo) Branch Commit Diff