GitHub

About

Enable

1. Set up GitHub permissions.

  • Make sure your HackMD email has GitHub access.
  • GitHub account level email: Profile (Top-right button) > Settings > Emails > Add email address
  • Or GitHub repository's permission settings: Team admin, Team member, or Invitee admin

a. HackMD menu (Bottom-left button with username) > Settings > Integration > Select Link with GitHub.

b. HackMD Hub by HackMD would like permission to: โ€ฆ > Select Authorize HackMD Hub

  • Error for a user without access: request to https://github.com/login/oauth/access_token failed, reason: read ECONNRESET

c. Manage GitHub Hackmd Hub app access.

3. Enable GitHub in a Note.

a. Note overflow menu (3 dots in the top-right) > Versions and GitHub Sync > Pull from GitHub or Push to GitHub > Select Authorize more repos

b. Install & Authorize HackMD Hub > For enhanced security only authorize HackMD access for Only select repositories vs. All repositories. > Select Install & Authorize

4. Change the GitHub .md file associated with a note.

a. Unlink: Note overflow menu (3 dots in the top-right) > Versions and GitHub Sync > GitHub Link Settings > Select Unlink.

b. Re-link to a new GitHub .md file.

Branches

  • Create new branch from HackMD
    • New repositories without a main branch
    • New feature branch in an existing repositiory
  • Sync with existing GitHub feature branches.
  • Submit pull requests (PR) in GitHub to merge feature branches with the main and/or production branch(es).
  • It can be useful to have a feature branch for each HackMD note.

Push

Pull

  • Pull from GitHub
  • Can choose the branch to pull from
  • Can choose the portion of pulled branch revisions to merge into the HackMD note

This is not technical advice. Always read the official documentation and do your own research.