GitHub Desktop is a seamless way to contribute to projects on GitHub and GitHub Enterprise. This graphical user interface (GUI) makes it easy for developers to use GitHub without the command line. In this guide, we'll cover everything from downloading GitHub Desktop to using it effectively across different operating systems.
GitHub Desktop download
To start using GitHub Desktop, you need to download the application. GitHub Desktop supports Windows and macOS. There is also a community-supported version for Linux users as well, although this is not officially maintained by GitHub.
- Windows and macOS: Visit the official GitHub Desktop website and choose the version for your operating system. The site automatically detects your OS and suggests the right version for download.
- Linux: For Linux users, you can find packages suitable for different distributions like Ubuntu, Fedora, or Arch Linux through community-maintained repositories. One of the most popular projects can be found here.
How to use GitHub desktop
Setting up your account
Once GitHub Desktop is installed, the first step is to log in with your GitHub or GitHub Enterprise account. This will sync your repositories and settings with GitHub Desktop.
Cloning a repository
To work on existing projects:
- Click on
File
>Clone repository
. - You can choose to clone a repository from your list of existing repositories on GitHub or enter a URL of a repository directly.
- Select the local path where you want the repository to be saved on your computer.
Creating a new repository
- Click on
File
>New repository
. - Provide the necessary information like repository name, local path, and initialization options (like adding a README, .gitignore, or a license).
- Click
Create Repository
to create it locally and on GitHub.
Making changes and committing
With GitHub Desktop, you can also make changes to your files and commit them:
- Open the repository in GitHub Desktop.
- Changes you make in the repository files are automatically shown in the app under the
Changes
tab. - You can select individual files to see diffs and decide what to commit.
- Write a commit message describing your changes and click
Commit to main
to commit the changes to the local repository.
Pushing changes to GitHub
After committing your changes locally, you need to push them to GitHub to make them available to others:
- Click the
Push origin
button to send your committed changes to GitHub.
Pulling updates from GitHub
To ensure you have the latest version of the repository:
- Click on
Repository
in the menu. - Select
Pull
to fetch and merge any changes from the remote repository into your local repository.
Branching
Branching is vital for managing different versions of a project:
- To create a new branch, click on the
Current Branch
tab at the top. - Click on
New Branch
, name it, and create it. - When you want to switch between branches, use the
Current Branch
tab to select different branches.
For further reading on GitHub Desktop, see the official GitHub Desktop documentation.