GitHub Desktop, a popular tool for managing Git repositories, offers developers a streamlined interface, making Git operations more approachable. While it’s a favorite among many, Linux users, especially those on Pop!_OS, might notice no official version available for them. Thankfully, the open-source community, always quick to find solutions, introduced the Shiftkey Linux project, providing an unofficial but highly functional version of GitHub Desktop for Linux enthusiasts.
Here’s what makes GitHub Desktop stand out:
- User-Friendly Interface: Simplifies Git operations, making it accessible even for those new to Git.
- Integrated Code Review: Easily review changes right from the application.
- Sync Capabilities: Effortlessly synchronize your local repositories with GitHub.
- Conflict Resolution: Built-in tools to handle and resolve merge conflicts.
The Shiftkey Linux project not only brings these features to Pop!_OS but also offers:
- Broad Compatibility: Works across various Linux distributions.
- Automatic Updates: Stay updated with the latest features and fixes.
- Installation Choices: Install directly as a DEB package or use the APT mirror for updates.
Our next section will guide you on how to install GitHub Desktop on Pop!_OS using the Shiftkey Linux project. Whether you’re a seasoned developer or just starting, this guide will help you set up and make the most of GitHub Desktop on your system.
Table of Contents
Section 1: Install GitHub Desktop via .DEB Package on Pop!_OS
While the official GitHub Desktop client predominantly supports Windows and macOS, a Linux version can be utilized thanks to the Shiftkey/Desktop project. This project fork has created a Linux-compatible variant of the software, catering to various Linux distributions, including Pop!_OS.
The first step towards installation involves downloading the latest release of the software. This guide focuses on installing the .deb
package, but there’s also an AppImage available for those familiar with its use.
Step 1: Fetching the GitHub Desktop .DEB File
To download the latest release of GitHub Desktop, utilize the following command in your terminal. This command retrieves the .deb
file from the GitHub repository and download it to your local system.
wget https://github.com/shiftkey/desktop/releases/download/release-x.x.x-linux/GitHubDesktop-linux-x.x.x-linux.deb
Remember to replace x.x.x
in the URL with the version number of the GitHub Desktop client you intend to install. You can find the most current release version from the Shiftkey Desktop releases page.
Step 2: Installing GitHub Desktop
With the .deb
file in hand, it’s now possible to install the GitHub Desktop application. In the commands that follow, replace <version_number>
with the version number of the .deb
file you downloaded.
sudo dpkg -i GitHubDesktop-linux-<version_number>-linux.deb
To shed some light on the components of this command, dpkg
is a package management system used to install, remove, and provide information about .deb
packages. The -i
flag used with the dpkg
command is an option that instructs dpkg to install the specified package.
Section 2: Install GitHub Desktop via APT PPA on Pop!_OS
The alternative way to install GitHub Desktop on Pop!_OS is through an APT repository. The beauty of this method is that it facilitates a straightforward updating process for your GitHub Desktop application, along with other packages. Currently, two third-party APT repositories in the United States serve as mirrors for the shiftkey/desktop GitHub project and are endorsed by the project page itself. While a few users outside the US might have difficulty connecting to a US mirror, this is not anticipated to affect most users.
Step 1: Update Pop!_OS
Ensure your Pop!_OS system is current before you install GitHub Desktop. The command to update your system is as follows:
sudo apt update && sudo apt upgrade
The purpose of this command is to refresh the package lists and upgrade all the installed packages to their latest versions.
Step 2: Installation of Required Packages
A set of prerequisite packages needs to be installed to utilize an APT repository to install GitHub Desktop. To install these packages, use the following command:
sudo apt install wget software-properties-common
These packages are necessary to import the GPG key and add the repository to your system.
Step 3: Importing the GitHub Repository
There are two available mirrors to choose from. While the first one is recommended, the second one can be opted for if any issues are encountered with the first.
Importing the GPG Key and Repository for @Shiftkey
To add the GPG key, use the following command:
wget -qO - https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null
Next, import the repository with this command:
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-desktop.list'
Alternative Mirror by @mwt
The alternative GPG key can be added with this command:
wget -qO - https://mirror.mwt.me/shiftkey-desktop/gpgkey | gpg --dearmor | sudo tee /etc/apt/keyrings/mwt-desktop.gpg > /dev/null
Similarly, the repository can be imported using this command:
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'
Step 4: Update the Package Lists
Once you have successfully imported one of the mirrors, perform an APT update to make sure the newly added repositories are recognized:
sudo apt update
Step 5: Installation of GitHub Desktop
Finally, to install the GitHub Desktop application, execute the following command:
sudo apt install github-desktop
This command will install the GitHub Desktop application from the chosen repository.
Section 3: Initiating GitHub Desktop
Post the successful installation of GitHub Desktop on your Pop!_OS system; it’s time to start the application. You have the flexibility to do this either via the terminal or using the graphical user interface (GUI).
Using the Terminal
To start GitHub Desktop through the terminal, execute the given command:
github-desktop
Running this command will initiate the GitHub Desktop application. If the application boots up without a hitch, you should be greeted with the main window. You can sign in, manage repositories, and conduct other Git-associated tasks here.
Utilizing the Graphical User Interface (GUI)
GitHub Desktop can be launched using the GUI pathway for those who prefer a visual approach. Simply navigate as follows:
Show Applications > GitHub Desktop
This will initiate the GitHub Desktop application, giving you access to its complete suite of features.
Section 4: Getting Acquainted with GitHub Desktop on Pop!_OS
Upon successful installation and initiation of GitHub Desktop on your Pop!_OS system, you are now ready to delve deeper into its functionalities, some adjustments for a personalized touch, and general advice for a smooth start with the application. This segment discusses various subjects to enhance your experience with GitHub Desktop on Pop!_OS.
Insightful Suggestions
- Account sign-in: It’s essential to sign in with your GitHub or GitHub Enterprise account to harness the full potential of GitHub Desktop. This enables an effortless way to access your repositories, manage your profile, and maintain synchronization with the remote server.
- Cloning repositories: The “Clone a Repository” feature can generate a local version of a remote repository on your Pop!_OS system. This flexibility lets you work on projects offline and synchronize your modifications later.
- Branch management: The intuitive interface of GitHub Desktop enables you to create, switch between, and merge branches seamlessly. This feature streamlines the process of dealing with multiple branches in a repository.
- Commit and push modifications: GitHub Desktop allows you to commit and push changes straight from the application. Track alterations, pen commit messages, and conveniently push your work to remote repositories.
Personal Adjustments
- Git settings configuration: GitHub Desktop provides an option to adjust your Git settings, including your name, email address, and preferred editor, via the “Preferences” menu. This ensures your commits are correctly attributed to you.
- Appearance modification: The “Preferences” menu offers the choice to alter the GitHub Desktop appearance by selecting a light or dark theme. Choose the one that best matches your liking and workspace atmosphere.
- Notification settings: GitHub Desktop lets you control the notifications you receive by tweaking the “Preferences” menu settings. Decide to receive notifications for particular events, like new commits, or disable notifications entirely.
Additional Recommendations
- Commit history review: The “History” tab in GitHub Desktop provides a visual record of your repository’s commit history. This provides a graphical representation of your project’s progress and allows you to review previous changes.
- Resolving merge conflicts: In case of any merge conflicts during your work with GitHub Desktop, the application furnishes in-built tools to help you navigate them. Examine the conflicting changes, select the appropriate version, and commit the resolution.
- Opening projects in the preferred editor: GitHub Desktop provides a feature that lets you open your repositories directly in your favorite code editor. To streamline your workflow, configure this setting in the “Preferences” menu.
By adopting these recommendations and making some personal tweaks, you are setting yourself up to utilize GitHub Desktop to its fullest on your Pop!_OS system.
Section 5: Administering GitHub Desktop on Pop!_OS
This section will delve into crucial commands and suggestions for proficiently managing your GitHub Desktop on your Pop!_OS system, which encompasses updating and eliminating the application.
Procedure 1: Refreshing GitHub Desktop
Maintaining the latest version of your GitHub Desktop application is pivotal to ensure access to the most recent features, bug resolutions, and security updates. The procedure for updates relies on your initial installation method.
Approach 1: Refresh Through the APT Repository
Suppose GitHub Desktop was installed using the APT repository technique. In this case, execute the subsequent commands to refresh your application:
sudo apt update
sudo apt upgrade
The command sudo apt update
updates your package lists, whereas sudo apt upgrade
elevates all installed packages, encompassing GitHub Desktop, to the latest obtainable versions.
Approach 2: Refresh Through .deb File
Suppose the installation of GitHub Desktop was carried out using the .deb file technique. In that case, you should fetch the most recent .deb file from the GitHub Desktop release page and reiterate the installation procedure delineated in Section 1.
Procedure 2: Uninstalling the GitHub Desktop Client
Should there ever arise a need to expel GitHub Desktop from your Pop!_OS system, it can be achieved with the succeeding command:
sudo apt remove github-desktop
Procedure 3: Eradicating GitHub Desktop-Related Data
Following removing the GitHub Desktop application, you might wish to remove all associated data. This includes data related to cloned repositories and configurations. To completely clean your system of GitHub Desktop, you’ll need to remove these additional directories.
Please remember that this action is irreversible and should be executed with caution.
Command 1: Removing Cloned Repositories
The default location for cloned repositories in GitHub Desktop is in your home directory under Documents/GitHub
. You can remove this directory and all its contents with the following command:
rm -rf ~/Documents/GitHub
Command 2: Deleting Configuration Data
GitHub Desktop stores configuration data in a hidden directory in your home folder. To delete this data, use the command:
rm -rf ~/.config/GitHub\ Desktop
By executing these commands, you will remove GitHub Desktop and all related data from your Pop!_OS system. Remember to verify whether you have any important data before executing these commands, as this operation is not recoverable.
Wrapping It Up: Installing and Managing GitHub Desktop on Pop!_OS
In summary, we’ve traversed the path of setting up GitHub Desktop on your Pop!_OS environment and covered significant pointers on how to make the most of this application. We initially guided you through the installation process, following which we delved into some handy tips and customizations to enhance your GitHub Desktop experience. Furthermore, we addressed updating and removing the application, plus removing any associated data, ensuring a comprehensive understanding of managing the software on your system.
The GitHub Desktop app on Pop!_OS can be a real game-changer for your coding projects, primarily through its intuitive interface and broad functionality. We recommend exploring all its features and tailoring them to your needs to facilitate your Git journey.