docs/contributing/setup.md
Refer to the specific instructions for each platform:
Experimental support for building Desktop is also available for these platforms:
Verify you have these commands available in your shell and that the found versions look similar to the below output:
$ node -v
v20.17.0
$ yarn -v
1.21.1
$ python --version
Python 3.9.x
There are also additional resources to configure your favorite editor to work nicely with the GitHub Desktop repository.
First, create a fork of desktop/desktop and then clone the repository to your local machine. You'll need to be inside the repository in order to build the application locally.
The typical workflow to get up running is as follows:
yarn to get all required dependencies on your machine.yarn build:dev to create a development build of the app.yarn start to launch the application. Changes will be compiled in the
background. The app can then be reloaded to see the changes (<kbd>Ctrl/Command+Alt+R</kbd>).Optional Tip: On macOS and Linux, you can use screen to avoid filling your terminal with logging output:
$ screen -S "desktop" yarn start # -S sets the name of the session; you can pick anything
$ # Your screen clears and shows logs. Press Ctrl+A then D to exit.
[detached]
$ screen -R "desktop" # to reopen the session, read the logs, and exit (Ctrl+C)
[screen is terminating]
If you've made changes in the main-process folder you need to run yarn build:dev to rebuild the package, and then yarn start for these changes to be
reflected in the running app.
If you are using GitHub Enterprise with your development build of GitHub Desktop, you will need to follow a few extra steps to authenticate properly.
If you're still encountering issues with building, refer to our troubleshooting guide for more common problems.
yarn test - Alias for yarn test:unityarn test:script - Runs all script testsyarn test:eslint - Runs all eslint testsyarn test:unit - Runs all unit tests
<file> argument to only run tests in the specified file<directory> to search for tests matching our test pattern in the given directory--test-name-pattern <pattern> to only match tests whose name matches the patternElectron ships with Chrome Dev Tools to assist with debugging, profiling and other measurement tools.
yarn start to launch the appWhen running the app in development mode, React Dev Tools should automatically install itself on first start when in development mode.
You're almost there! Here's a couple of things we recommend you read next: