How to Install GitHub Desktop on Ubuntu 24.04

Choose a different version or distribution

Introduction

Before we discuss how to install GitHub Desktop on Ubuntu 24.04, let's first understand-What is GitHub Desktop?

GitHub Desktop is a user-friendly application designed to simplify version control using Git, a popular tool among developers. It offers an intuitive interface that enables easy management of code repositories, tracking of changes, and seamless collaboration on projects.

Ideal for both beginners and experienced developers, GitHub Desktop enhances workflow efficiency by providing a straightforward platform to manage and synchronize code changes effortlessly. Boost productivity with its intuitive features and streamline your development process with projects.

In this tutorial, you will install GitHub Desktop on Ubuntu 24.04. We will also address a few FAQs on how to install GitHub Desktop on Ubuntu 24.04.

Advantages

  1. User-Friendly Interface: GitHub Desktop offers an intuitive and easy-to-use interface for managing repositories, making it suitable for both beginners and advanced users.
  2. Seamless Collaboration: Simplifies collaboration by allowing team members to work together on projects efficiently.
  3. Visual Diffs: Provides visual representations of code changes, making it easier to review and manage modifications.
  4. Local Development: Supports offline work with local repositories, enabling developers to work without an internet connection.
  5. Cross-Platform Compatibility: Works on both Windows and macOS systems, ensuring a consistent experience across different operating systems.

Installing GitHub Desktop Client on Ubuntu 24.04

Method 1. Using the Deb repository

Step 1. Update Packages

To guarantee that all available package updates are installed on your Ubuntu Linux machine, start by running the system update command on it. Additionally, this operation will update the default package manager's (APT) package index cache.

sudo apt update && sudo apt upgrade

Step 2. Add ShiftKey GPG Key

Currently, Linux operating systems, including Ubuntu, cannot download the official GitHub Desktop client. Instead, we are using GitHub Desktop - The Linux Fork by ShiftKey, a project hosted on GitHub.

To utilize the repository provided by the fork's creators on our system, run the following command in your Ubuntu terminal to add the project's GPG key.

wget -qO - https://mirror.mwt.me/shiftkey-desktop/gpgkey | gpg --dearmor | sudo tee /etc/apt/keyrings/mwt-desktop.gpg > /dev/null

Step 3. Add GitHub Desktop repository on Ubuntu

To install GitHub Desktop fork packages on Ubuntu 24.04, let's add the repository first, followed by the GPG key. By simply running the system update and upgrade command, we can quickly obtain future updates of the application instead of having its Debian packages bundled as executable binary. This is a benefit of using a repository technique.

sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/mwt-desktop.gpg] https://mirror.mwt.me/shiftkey-desktop/deb/ any main" > /etc/apt/sources.list.d/mwt-desktop.list'

Remember to execute the system update command once more following the repository addition.

sudo apt update

Step 4. GitHub Desktop installation on Ubuntu 24.04

At last, all the components needed to download and launch the GitHub Desktop App for Ubuntu Linux have been integrated. Let's utilize Ubuntu's integrated package manager, APT, to install it on our Linux machine at last.

sudo apt install github-desktop

Method 2. Using Flatpak

Step 1. Install Flatpak

To avoid using the repository technique, one option is to use the Flatpak Universal Package Manager. Nevertheless, it is not by default usable on Ubuntu, in contrast to Snap. As a result, we must install it manually.

Here are the commands to follow.

sudo apt install flatpak

After the installation is finished, add the Flathub remote repository so that we can install different packages on our Linux system from it.

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Once each of those commands are finished, our Ubuntu OS will be successfully enabled for Flatpak; however, a system reboot is necessary. This ensures the package manager's correct Linux integration.

sudo reboot

Step 2. Install the Linux GitHub Desktop application using Flatpak

Let's use Flatpak to download and install the GitHub desktop release on Ubuntu 24.04 Linux via Flathub now that the system has restarted.

The command to install Flatpak on GitHub Desktop may be found here.

flatpak install -y flathub io.github.shiftey.Desktop

Step 3. Run Linux GitHub Desktop

Using the Activities link from the Taskbar or the Windows key on your keyboard to search GitHub will launch the application, regardless of the method you used. Click to run the same as soon as its icon shows up.

Now, to manage Git repositories directly on the Ubuntu Linux system, log in with GitHub.com or GitHub Enterprise using your account information.

The following commands can be used to launch the Git GUI client application from the command line:

github-desktop

How to update the app on Linux

We can install any upcoming upgrades for the GitHub Desktop app using the same manner, depending on how you installed it on Ubuntu.

Those who have utilized the repository technique only need to execute the following system update command:

sudo apt update && sudo apt upgrade

Whereas, Flatpak users need to run:

flatpak update

Uninstall or Remove GitHub Desktop from Ubuntu

GitHub Desktop may be easily removed from Ubuntu using a simple procedure.

Using the apt package manager is the initial step in removing GitHub Desktop from your Ubuntu system. Launch the terminal window, then enter:

sudo apt-get remove github-desktop

This command will remove all GitHub Desktop-related packages, including with any system data and configuration files.

For users of Flatpak, the second approach is as follows:

flatpak remove --delete-data io.github.shiftey.Desktop

FAQs to Install GitHub Desktop on Ubuntu 24.04

Where is GitHub Desktop installed on my system?

GitHub Desktop is installed under /opt/github-desktop/.

How do I clone a repository using GitHub Desktop?

Click the "+" button in the top-left and select "Clone repository". Enter the repository URL or select it from your list of repositories.

How do I push my changes to GitHub using GitHub Desktop?

After committing your changes, click the "Push origin" button in the toolbar to push your changes to the remote repository.

How do I pull the latest changes from GitHub using GitHub Desktop?

Click the "Fetch origin" button in the toolbar to fetch the latest changes from the remote repository. Then click "Pull origin" to merge those changes into your local repository.

How do I view the commit history using GitHub Desktop?

Click the "History" tab in the left sidebar to view the commit history for the current repository.

How do I view the changes in a specific commit?

Select a commit in the history and the changes will be displayed in the "Changes" tab.

How do I revert a specific commit using GitHub Desktop?

Right-click on a commit in the history and select "Revert" to create a new commit that reverts the changes from that commit.

Conclusion

We hope this tutorial helped you understand how to install GitHub Desktop on Ubuntu 24.04.

If you have any queries, please leave a comment below, and we’ll be happy to respond to them for sure.