How to Install GitHub Desktop on Linux Mint 21 or 20

For those aiming to install GitHub Desktop on Linux Mint 21 or 20, the solution lies in a seamless interface tailored for Git management. With its intuitive graphical interface, GitHub Desktop revolutionizes how developers interact with their Git repositories. It bridges the gap between complex Git commands and a user-friendly environment, ensuring efficient version control and collaboration.

Core Features of GitHub Desktop:

  • Repository Management: Whether cloning from GitHub or adding local repositories, GitHub Desktop streamlines the process, ensuring easy access to your projects.
  • Branch Operations: Navigate the development landscape easily, from creating and switching branches to merging updates, all within a few clicks.
  • Commit Precision: Commit changes with detailed messages, ensuring clarity in version history and facilitating synchronization between local and remote repositories.
  • Conflict Resolution: Tackle merge conflicts head-on with an integrated tool, reviewing and resolving discrepancies before finalizing merges.
  • Tool Integration: Enhance your workflow by linking GitHub Desktop to your favorite text editor or IDE, optimizing the coding process.
  • User-Centric Design: With a focus on usability, GitHub Desktop caters to both Git novices and seasoned developers, ensuring a streamlined code management experience.

Embracing GitHub Desktop translates to a more organized, efficient, and collaborative coding journey. The subsequent sections will guide you through the installation process on Linux Mint, covering methods like manual Debian package installation, third-party APT mirror addition, or Flatpak integration with Flathub. Stay tuned for essential tips to kickstart your GitHub Desktop journey on Linux Mint.

Update Linux Mint Before GitHub Desktop Installation

Before beginning the installation process, it’s crucial to ensure your system is current to avoid conflicts. Update your system’s package lists and install available updates by executing the following command in the terminal:

sudo apt update && sudo apt upgrade

This command ensures that your Linux Mint system has the most recent software installed.

Install GitHub Desktop on Linux Mint 21 or 20 via .deb

While GitHub officially supports only Windows and macOS, Linux users can access the platform through a “shiftkey/desktop project.” This fork provides Linux-compatible packages for various distributions.

To start, visit the releases page and download the most recent release. Although this guide focuses on installing the “.deb” package, you can also choose the AppImage if you prefer and are familiar with it.

Download the latest release using the following command in your terminal:

wget https://github.com/shiftkey/desktop/releases/download/release-3.1.7-linux1/GitHubDesktop-linux-3.1.7-linux1.deb

Please do not copy the above command, it will become outdated shortly, it’s only for demonstration purposes, visit the link to get the latest version.

This command downloads the .deb file. Now install the version downloaded. Our guide was version 3.1.7 RC1, for example. Replace <filename> in the command below with the name of the “.deb” file you downloaded:

sudo dpkg -i <filename>.deb

Example with 3.1.7 RC1:

sudo dpkg -i GitHubDesktop-linux-3.1.7-linux1.deb

For those Linux Mint users who might not know, dpkg is a package manager used to install, remove, and manage Debian packages. It’s a fundamental tool for installing .deb packages on your Linux Mint system.

The “-i” flag is a command option that tells dpkg to install the specified package. When using dpkg with the “-i” flag, provide the filename of the package you want to install as an argument.

Install GitHub on Linux Mint 21 or 20 via APT PPA

The second approach to installing GitHub Desktop is similar to the first method. Two third-party APT repositories in the United States are mirrors for the shiftkey/desktop GitHub project. These repositories are endorsed and listed on the project’s page. This method is preferable as it enables easy updating of your GitHub Desktop application and other packages. However, some users in other parts of the world may experience difficulties connecting to a US mirror, although this is not expected to impact most users.

Here are two mirrors. It is recommended to use the first one, but you can opt for the second one if you encounter any issues.

Import GPG key and repository for @shiftkey:

wget -qO - https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main" > /etc/apt/sources.list.d/shiftkey-packages.list'

Alternative mirror by @mwt:

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

After importing one of the mirrors, a quick APT update is recommended to ensure that the newly added lists are recognized.

sudo apt update

To install GitHub Desktop, use the following command:

sudo install github-desktop

Install GitHub Desktop on Linux Mint 21 or 20 via Flatpak and Flathub

The third method for installing GitHub Desktop on Linux Mint involves utilizing Flatpak, a powerful utility that streamlines the installation and management of Linux applications, along with the Flathub repository. Flatpak is natively installed on Linux Mint as a replacement for Snapcraft, which is disabled on all Linux Mint systems.

To activate Flathub for Flatpak on your Linux Mint system, execute the following command in your terminal:

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

Once Flathub is enabled, install GitHub Desktop using the subsequent flatpak command:

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

This command downloads and installs the GitHub Desktop application, including all necessary dependencies, onto your Linux Mint system. This approach allows you to easily manage and update your GitHub Desktop application alongside other Flatpak applications.

Launching GitHub Desktop on Linux Mint 21 or 20

Once you have successfully installed GitHub Desktop on your Linux Mint system, there are several ways to launch it, depending on your installation method.

CLI Launch Method on Linux Mint for GitHub Desktop

github-desktop

If you installed GitHub Desktop using Flatpak, use the following command to launch it:

flatpak run io.github.shiftey.Desktop

GUI Launch Method on Linux Mint for GitHub Desktop

You can also find and launch GitHub Desktop through your system’s application menu. To do this, click the “Menu” icon on your taskbar, then navigate to the “All Applications” section. Look for the GitHub Desktop icon, click on it, and the application will launch, ready to use with your projects.

GitHub Desktop icon in Linux Mint taskbar UI
Click to launch GitHub Desktop from Linux Mint taskbar

Tips on Getting Started on GitHub Desktop with Linux Mint 21 or 20

Once you have successfully launched GitHub Desktop on your Linux Mint system, follow these initial steps and general tips to make the most of your experience. Customization options are available to personalize your GitHub Desktop client to fit your preferences and workflow.

Initial Actions with GitHub Desktop on Linux Mint

  • Sign in: Sign in to your GitHub or GitHub Enterprise account. You can create one from the GitHub Desktop client if you don’t have an account.
  • Add or create repositories: After signing in, add existing repositories from your computer or create new ones directly from the GitHub Desktop interface.
  • Clone repositories: Clone repositories from your GitHub or GitHub Enterprise account, making it easy to work on your projects locally.

General Tips with GitHub Desktop on Linux Mint

  • Keep your repositories organized: Use clear and descriptive names, and consider grouping related repositories in folders to maintain a clean and organized workspace.
  • Use branches: Leverage branches to work on new features or bug fixes, keeping your main branch clean and stable. You can easily create, switch between, and merge branches using the GitHub Desktop interface.
  • Commit early and often: Make frequent and meaningful commits, providing concise and informative commit messages to track changes and make collaboration more efficient.
  • Stay in sync: Regularly fetch updates from the remote repository, push your local changes to avoid merge conflicts, and ensure your work aligns with your team’s progress.

Customization Tips with GitHub Desktop on Linux Mint

  • Adjust appearance: Personalize your GitHub Desktop experience by choosing between light and dark themes, depending on your preference or work environment.
  • Customize font size: Enhance readability by adjusting the font size according to your needs through the client’s settings.
  • Configure external tools: Integrate GitHub Desktop with your preferred text editor or integrated development environment (IDE) for seamless code editing.
  • Manage notifications: Control how and when GitHub Desktop sends you notifications by adjusting settings, ensuring you stay informed without being overwhelmed by alerts.
GitHub Desktop ready for use on Linux Mint desktop
GitHub Desktop open and operational on Linux Mint

Managing with GitHub Desktop on Linux Mint 21 or 20

Update GitHub Desktop on Linux Mint

The method to update GitHub Desktop on Linux Mint varies based on whether you installed it using Flatpak, a .deb package, or APT. Staying current is essential for the smooth functioning of your system and ensuring you have access to the latest features and security updates.

Flatpak Update Command Method on Linux Mint

To update GitHub Desktop installed via Flatpak, execute the following command in the terminal:

flatpak update

APT Update Command Method on Linux Mint

If you installed GitHub Desktop using the APT mirror, you can update it using standard APT commands:

sudo apt update && sudo apt upgrade

.deb Update Method on Linux Mint

Manual updates are necessary for those who installed GitHub Desktop using a .deb package. Visit the official GitHub Desktop releases page, download the most recent .deb package, and install it using the dpkg command.

Remove GitHub Desktop from Linux Mint

Should you decide that GitHub Desktop is no longer needed on your Linux Mint system, follow these simple steps to remove it.

APT GitHub Desktop Command Method for Linux Mint:

To remove GitHub Desktop installed using the APT package manager, use this command:

sudo apt remove github-desktop

Removing the APT repository is recommended if you don’t use this method to reinstall GitHub Desktop. Depending on the repository you imported, use the appropriate command:

sudo rm /etc/apt/sources.list.d/shiftkey-packages.list
sudo rm /etc/apt/sources.list.d/mwt-desktop.list

Flatpak GitHub Desktop Remove Command Method for Linux Mint:

For installations using Flatpak, you can use the following command to remove GitHub Desktop, including all its data:

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

This command ensures a clean uninstallation by deleting all associated data and configuration files, freeing up space on your system.

.deb GitHub Desktop Remove Command Method for Linux Mint:

If you installed GitHub Desktop using a .deb package, you’ll need to use the APT command to remove it manually:

sudo apt remove github-desktop

This command uninstalls the package but leaves associated data and configuration files intact. To remove these as well, use the –purge option.

Conclusion

In conclusion, installing GitHub Desktop on Linux Mint is a straightforward process with multiple methods, including the .deb package, APT package manager, and Flatpak. Each method has its advantages and updating process. Following the steps in this guide, you can quickly get started with GitHub Desktop on your Linux Mint system and manage your projects more efficiently.

Leave a Comment