Skip to content

GitHub workflow using GitHub Desktop

Brenden Disher edited this page Feb 28, 2022 · 1 revision

The following page describes the GitHub workflow using the GitHub Desktop for NHS-Practitioners-Guide

Note: The desktop version of GitHub can be downloaded here

1) Fork the repository

Use the fork button on the official repository to fork the repository to your personal GitHub account. This function will create a copy of the official repository on you personal account.

forked_repo (2)

2) Clone the forked repository to your local machine

Next, the forked repository on your personal GitHub account must be cloned to your local machine. To do this using GitHub Desktop, navigate to file > clone repository. Next, select the forked repository on your GitHub account, and select a path to store the cloned repository.

gui_2

After selecting clone, the repository should be available.

3) Add an upstream link to the main repository

GitHub desktop will automatically set upstream and origin remotes. To do so, select To contribute to the parent project

gui_4

Important: Keeping your local repository up-to-date

It is important to frequently keep your local repository up-to-date with updates from the official repository.

The Fetch button within the app can be used to keep the repository up-to-date.

4) Commit and push the changes to your forked repository.

After making and saving your changes, they will appear in GitHub Desktop application. Add a summary and description describing what was changed, then commit the changes by selecting commit to main.

gui_5

After committing the changes, push them to origin.

gui_6

5) Submit a pull request

In the desktop app, navigate to Branch > Create pull request

Note: In the desktop application, the head repository and base repository are automatically populated. Ensure this information is correct before proceeding.

gui_8

Next, the changes will be compared between each forked branch. Pull_req6

Finally, complete the pull request and create a message stating what changes were made. Pull_req7