Prerequisites
- macOS
- Windows
- Linux
You will need to install these tools on your machine:
- Node.js
- Yarn
- Python 3
- Xcode and Xcode Command Line Tools (Xcode → Preferences → Downloads)
Installing Dependencies
- macOS
- Windows
- Linux
1
Install Node.js
Check if you have the right version of Node.js installed:If you see an error, download Node from the Node.js website and install the package.Verify your installed version matches our .node-version file. Usually the same major version is enough.
Using different Node.js versions across projects
Using different Node.js versions across projects
We support these Node version managers:
nvm and asdf-nodejs.Using nvm:- Install
nvmusing the instructions here - Within the Desktop source directory, install the required version:
- Ensure you are running the right version:
- Verify by running
node -vagain
2
Install Yarn
Follow this guide to install a system-level
yarn.GitHub Desktop uses a local version of
yarn, but it needs a version on your PATH to bootstrap itself. Yarn uses lock files to pin dependencies and prevent version mismatches between machines.3
Verify Python 3
macOS comes with Python pre-installed. Verify you have the right version:You should see
Python 3.9.x or similar.Using different Python versions across projects
Using different Python versions across projects
We recommend pyenv for managing Python versions.
- Install pyenv according to the instructions
- Within the Desktop source directory, install the required version:
- Verify by running
python3 --versionagain
4
Install Xcode Command Line Tools
Run this command to install the Xcode command line tools:If you already have them installed, it will notify you.
Verify Installation
Verify you have these commands available in your shell and that the found versions look similar to the output below:Building Desktop
1
Fork and clone the repository
Create a fork of
desktop/desktop and clone it to your local machine. Navigate into the repository directory.2
Install dependencies
Run
yarn to get all required dependencies:3
Create a development build
Build the application for development:
4
Launch the application
Start the application:Changes will be compiled in the background. Reload the app to see changes using Ctrl/Command+Alt+R.
Optional Tip: On macOS and Linux, you can use
screen to avoid filling your terminal with logging output:Running Tests
Debugging
1
Launch the app
Run
yarn start to launch the app.2
Open Developer Tools
Under the View menu, select Toggle Developer Tools.Electron ships with Chrome Dev Tools to assist with debugging, profiling, and other measurement tools.
When running the app in development mode, React Dev Tools should automatically install itself on first start.
Additional Resources
- Working with packages
- GitHub Enterprise authentication from dev build
- Troubleshooting guide
- Tooling configuration - Configure your favorite editor to work with the GitHub Desktop repository
Next Steps
Once your environment is set up, check out:- Help Wanted - Tasks marked as ideal for external contributors
- Notes for Contributors - Guidance for new contributors getting started