SovranCode
HomeCourses Git & GitHub GitHub Collaboration
This device
Course contentsGitHub Collaboration · 41 topics

1. Git Fundamentals

Git IntroductionGit Version ControlGit vs GitHubGit InstallationGit Working TreeGit RepositoryGit CommitGit .gitignoreGit Project: Learning Journal

2. Git History

Git LogGit DiffGit ResetGit RevertGit StashGit Project: Messy Repository

3. Branches & History

Git BranchGit MergeGit Merge ConflictsGit RebaseGit Cherry-PickGit TagsGit Project: Feature Branch

4. Remotes and GitHub

Git RemoteGitHub AuthenticationGitHub RepositoryGitHub ForkGitHub IssuesGitHub PagesGit Project: Two Clone Sync

5. GitHub Collaboration

GitHub Pull RequestsGitHub Code ReviewGit Branching WorkflowGitHub Branch ProtectionGitHub CollaborationGitHub ContributingGit Project: Reviewed Pull Request

6. Automation and Professional Git

GitHub ActionsGit InternalsGit RecoveryGitHub SecurityGit Project: Team Repository CIProject
Learn Git & GitHub40 complete · 1 planned

1. Git Fundamentals

Git IntroductionGit Version ControlGit vs GitHubGit InstallationGit Working TreeGit RepositoryGit CommitGit .gitignoreGit Project: Learning Journal

2. Git History

Git LogGit DiffGit ResetGit RevertGit StashGit Project: Messy Repository

3. Branches & History

Git BranchGit MergeGit Merge ConflictsGit RebaseGit Cherry-PickGit TagsGit Project: Feature Branch

4. Remotes and GitHub

Git RemoteGitHub AuthenticationGitHub RepositoryGitHub ForkGitHub IssuesGitHub PagesGit Project: Two Clone Sync

5. GitHub Collaboration

GitHub Pull RequestsGitHub Code ReviewGit Branching WorkflowGitHub Branch ProtectionGitHub CollaborationGitHub ContributingGit Project: Reviewed Pull Request

6. Automation and Professional Git

GitHub ActionsGit InternalsGit RecoveryGitHub SecurityGit Project: Team Repository CIProject
PREVIOUS LESSONGitHub Branch Protection
NEXT LESSONGitHub Contributing
5. GitHub Collaboration 60 min

GitHub Collaboration

Give issues and pull requests a repeatable shape so the team does not reinvent the same missing context.

What you will leave with

You will add a bug issue template and a pull request template, create a few GitHub labels that name a job, and know that a board is GitHub columns for issues—not a Git branch. You will not rewrite the Issues or Pull Requests lessons, and you will not add a contributing guide yet.

Shape is GitHub; files are Git

GitHub Issues already required problem, expected result, and reproduction. GitHub Pull Requests already required what changed, how to verify, and Closes #N. This lesson makes those arguments the default on a repository you own, so the next issue is not a blank box.

GIT

The files

Templates are ordinary paths, usually under .github/. git add stages them. They travel with the clone.

GITHUB

The forms, labels, and board

GitHub prefills New issue and New pull request from those files. Labels and Projects live on GitHub. Clone the repo elsewhere and the files come along; the board columns do not become Git refs.

# These are Git. None of them is a GitHub template, label, or board.
git add README.md
git commit -m "Note"
git push origin main

Use a disposable GitHub repository you own. Do not push a .github folder onto a project you do not maintain. A contributing guide for outsiders is GitHub Contributing.

Templates do not protect main

A pull request template does not stop a direct push. That job is GitHub Branch Protection. Keep both: a shape for the conversation, a rule for the default branch.

Issue templates

Put a markdown template at .github/ISSUE_TEMPLATE/bug.md. The YAML front matter is GitHub, not Git: it names the template in the chooser and can apply a label. The body should force the same complete report the Issues lesson already taught.

---
name: Bug
about: A problem with expected result and reproduction
labels: bug
---

## Problem


## Expected result


## Reproduction
1.
2.
3.

After this file is on the default branch, GitHub’s New issue page can offer Bug. If someone still files a one-line complaint, that is a process miss, not a missing Git object. Do not add six templates you will not use. One honest bug template is enough for this lab.

Front matter

name and about show in the template chooser. labels: bug applies a GitHub label if that label exists.

Body

Empty headings are prompts. Fill them when you file. A template that already contains a fake bug is worse than none.

Not a substitute for judgment

The template cannot invent a reproduction the reporter does not have. It can refuse to start from a blank description.

This lab

One bug template. Skip YAML issue forms and contact links until this markdown shape is live.

Pull request templates

GitHub reads .github/PULL_REQUEST_TEMPLATE.md (or docs/PULL_REQUEST_TEMPLATE.md) from the default branch and pastes it into a new pull request body. Match the description this course already treats as the minimum.

## Summary


## Linked issue
Closes #

## How to verify
1.
2.

Leave Closes # for the author to finish with a real number. A template that says Closes #1 on every pull request will close the wrong issue. Verify steps stay numbered and empty until the author writes them.

# From a clone of a GitHub repository YOU own
git switch main
git pull origin main
git switch -c feature/collaboration-shape

mkdir -p .github/ISSUE_TEMPLATE
# Write .github/ISSUE_TEMPLATE/bug.md and .github/PULL_REQUEST_TEMPLATE.md, then:
git add .github/ISSUE_TEMPLATE/bug.md .github/PULL_REQUEST_TEMPLATE.md
git diff --cached
git commit -m "Add issue and pull request templates"
git push -u origin feature/collaboration-shape
QUICK CHECK

Test what you learned

Type the Git command that stages .github/PULL_REQUEST_TEMPLATE.md.

Open a pull request from feature/collaboration-shape so the templates themselves are reviewed. After it merges, the next New pull request on this repository should show the headings.

Labels that name a job

A label is GitHub metadata on an issue or pull request. It is not a Git tag. Create a label when you can say what it changes about the next action: file a reproduction, treat as docs, or close as not a bug.

gh label list
gh label create needs-repro --description "Issue is missing reproduction steps" --color D73A4A
gh label list
QUICK CHECK

Test what you learned

Type the GitHub CLI command that lists labels for this repository.

QUICK CHECK

Test what you learned

Type the GitHub CLI command that creates a label (the name and flags come after).

needs-repro

The issue is missing the reproduction the template asked for. Next action: ask for steps, not start coding.

bug

The report names a problem and expected result. Next action: reproduce, then branch.

docs

The work is a README or template change, not a behavior change. Keep the pull request small.

Not a rainbow

Do not create twenty colors. Unused labels teach nothing. Delete or skip names you cannot explain.

gh label create talks to GitHub immediately. It does not wait for a commit. The template file still needs a commit and a merge onto the default branch before New issue uses it.

Boards are not branches

A GitHub Project (board) is columns of issues and pull requests: Todo, In progress, Done, or whatever names you choose. GitHub stores that view. git branch --list will not show it. Moving a card does not move HEAD.

What a board is for

See which complete issues are unstarted, which have an open pull request, and which are done—without rereading the Issues tab as a pile.

What it is not

Not a Git Flow develop branch. Not a substitute for a pull request. Not GitHub Actions.

This lab

Optional: in the GitHub UI, create a simple Project, add the practice issue, and drag it once. The required proof is templates plus labels. Do not automate Projects with GraphQL here.

Keep it small

Three columns beat eight empty ones. A board nobody updates is decoration.

What not to invent

Templates on a stranger’s repo

Do not open a pull request that only adds .github to a popular project as homework.

A contributing guide in this lesson

How an outsider forks and responds to review is GitHub Contributing. Keep this workshop on shape for a repo you own.

Actions as labels

A label named ci does not run tests. Workflows stay for GitHub Actions.

Blank-issue lockout

Do not set blank_issues_enabled: false on a solo practice repo until you have at least one working template. Locking the form with no template hides the Issues tab.

Guided practice: one repeatable shape

  1. 01
    Pick a repository you own

    Confirm git remote -v is your GitHub URL. Update local main.

  2. 02
    Add the two files

    On feature/collaboration-shape, add .github/ISSUE_TEMPLATE/bug.md and .github/PULL_REQUEST_TEMPLATE.md. Open a pull request and merge it.

  3. 03
    Create labels

    gh label list. Create needs-repro (and bug if GitHub did not already). Confirm the list.

  4. 04
    File one issue from the template

    Use New issue → Bug. Fill problem, expected result, and reproduction. Apply bug if the template did not.

  5. 05
    Optional board

    Create a GitHub Project with Todo / In progress / Done. Put that issue on Todo. Do not spend the lab on automation.

Independent lab: collaboration shape

  1. On a GitHub repository you own, add .github/ISSUE_TEMPLATE/bug.md with problem, expected result, and reproduction headings, and .github/PULL_REQUEST_TEMPLATE.md with summary, verify steps, and Closes #. Land them through a short-lived pull request, not a direct commit on main if protection is on.
  2. Run gh label list. Create needs-repro with gh label create unless it already exists.
  3. Open one GitHub issue using the bug template and fill every heading. Show that the New pull request form includes your template headings (open a draft or screenshot; you do not have to merge a second feature).
  4. Optional: add that issue to a GitHub Project board and name the columns.
  5. Write six lines: repository URL, issue template path, pull request template path, labels you created, one sentence that distinguishes a GitHub label from a Git tag, and one sentence that distinguishes a board from a branch. Do not add templates to a project you do not maintain.
Definition of done

You can store issue and pull request templates in Git for GitHub to read, create a few labels that name a job, and explain that a board is GitHub columns—not a Git ref—on a repository you own.

Common collaboration mistakes

Empty templates

A file named bug.md that only says “describe here” still produces vague issues. Use the headings the Issues lesson already required.

Calling labels Git tags

Tags name commits. Labels classify GitHub conversations.

A board instead of a pull request

Dragging a card to Done does not merge main. The graph still needs a reviewed pull request.

Template spam on strangers

Your practice .github belongs on your practice remote.

Lesson review

You can give a repository you own a repeatable GitHub shape for issues and pull requests, keep labels as GitHub metadata, and refuse to treat a board as a branch. How an outsider forks and answers review is GitHub Contributing. A check reviewers can trust is GitHub Actions.

  • I know templates are Git files that GitHub reads, not a git template command.
  • I can add .github/ISSUE_TEMPLATE/bug.md and .github/PULL_REQUEST_TEMPLATE.md with headings a stranger can fill.
  • I can gh label list and gh label create for a few jobs, not a rainbow of unused names.
  • I know a GitHub board organizes issues and pull requests and does not move Git refs.

Related lessons

  • GitHub Issues — Templates make issue reports complete enough to act on.
  • GitHub Pull Requests — The same shape helps reviewers start from evidence.
  • GitHub Repository — Templates and labels live on the hosted repository GitHub reads.
  • GitHub Branch Protection — A template does not protect main; a GitHub rule does.
  • GitHub Contributing — A contributing guide comes after the issue and pull request already have a shape.
KNOWLEDGE CHECK

Check your GitHub Collaboration model

Keep templates and labels on GitHub, store the files in Git, and refuse a board that pretends to be a branch.

01What are GitHub issue and pull request templates?
02Does git commit create a GitHub label?
03What belongs in a useful bug issue template?
04What belongs in a useful pull request template?
05What is a GitHub board (Project) in this course?
06How many labels should a small practice repository start with?
07Where should you add templates and labels for this lesson?
PREVIOUS LESSONGitHub Branch Protection
NEXT LESSONGitHub Contributing
ON THIS PAGEGitHub CollaborationShape is GitHub; files are GitIssue templatesPull request templatesLabels that name a jobBoards are not branchesWhat not to inventGuided practice: one repeatable shapeIndependent lab: collaboration shapeCommon collaboration mistakesLesson reviewKnowledge checkRelated lessons
Course contents