Skip to main content

Setting up Local Documentation

note

Some things won't display properly like logos or protobufs, this is not cause for concern.

Prerequisites

In order to set up your local environment, you will need to install:

Getting Started

Fork the Meshtastic Repository

Log into Github and create a fork of the meshtastic/Meshtastic repository.

Clone your Meshtastic Repository fork

note

Replace username with your Github username.

Clone username/Meshtastic Repo
git clone https://github.com/username/Meshtastic.git

Change directory to Local copy

Change Directory
cd ~/Meshtastic

Install Dependencies

Install dependencies using Yarn
yarn install

Run Development Server

Run node.js server
yarn start
tip

Before submitting a pull request, it's helpful to run the following command to ensure there are no broken links or errors:

Build Project
yarn build

Update Local Repository

Verify Upstream Remote is Set

Check Remote and Upstream Repositories
git remote -v

If it's set, skip to Align with meshtastic/Meshtastic Master branch

Update/Set Upstream if it isn't configured properly

If upstream exists, set the url:

Update Upstream Repository
git remote set-url upstream https://github.com/meshtastic/Meshtastic.git

If upstream doesn't exist, add the url:

Add Upstream Repository
git remote add upstream https://github.com/meshtastic/Meshtastic.git

Align with meshtastic/Meshtastic Master branch

caution

This will delete any unfinished work. Make sure that you've saved and committed any work you wish to push up to your fork.

info

The following command assumes the clone of your Meshtastic fork is in the home directory (~/Meshtastic). Adjust the path to the correct path on your machine.

Rebase local Meshtastic to remote Meshtastic
cd ~/Meshtastic ; git fetch upstream ; git checkout master ; git rebase upstream/master