Skip to content

Instantly share code, notes, and snippets.

@anzz1
Last active August 12, 2023 13:58
Show Gist options
  • Save anzz1/b2d92194e30768a1c340e142bb1ae542 to your computer and use it in GitHub Desktop.
Save anzz1/b2d92194e30768a1c340e142bb1ae542 to your computer and use it in GitHub Desktop.
GitHub New Repo 101

GitHub New Repo 101

Main Page

https://github.com/USER/REPO/

Click the gear icon on the right sidebar next to "About".

Include in the home page

Uncheck everything you don't need to remove clutter.
When in doubt, uncheck. You can always recheck later.

General

https://github.com/USER/REPO/settings

Features

Uncheck everything you don't need to remove clutter.
When in doubt, uncheck. You can always recheck later.

Pull requests
  • Allow merge commits
  • Allow squash merging
    • Default to pull request title and commits details
  • Allow rebase merging
  • Always suggest updating pull request branches
  • Allow auto-merge
  • Automatically delete head branches

Actions

https://github.com/USER/REPO/settings/actions

Actions permissions
  • Allow all actions and reusable workflows
Fork pull request workflows
  • Run workflows from fork pull requests
  • Require approval for fork pull request workflows
    If you want to approve test workflows on pull requests before they are ran
Workflow permissions
  • Read and write permissions

Optional - Master branch protection

https://github.com/USER/REPO/settings/branch_protection_rules/new?branch_name=master

Branch name pattern

master

Protect matching branches
  • Require a pull request before merging
  • Require approvals
    If your project has multiple collaborators and you want pull requests from collaborators to be reviewed by other collaborator(s).
  • Require status checks to pass before merging
  • Require branches to be up to date before merging
  • Require linear history
    Keep history clean by blocking merge commits in favor of squash or rebase. Highly recommended.

Approving and merging pull requests

When to ?

  • Create a merge commit: Never
  • Squash and merge: You want all the commits from the PR to appear as a single commit in the master branch.
  • Rebase and merge: You want all the commits from the PR to appear as-is in the master branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment