How to Install Sourcetree on Ubuntu
Last Updated :
14 Oct, 2024
Managing repositories and tracking changes can sometimes be overwhelming, but with Sourcetree, developers can simplify version control and boost productivity. In this article, we will be installing the Sourcetree application on the Ubuntu system in a step-by-step process.Â
What is Sourcetree?
Sourcetree is a GUI-based Git and Mercurial client application for managing and organizing repositories. Sourcetree provides a user-friendly GUI for performing various Git and Mercurial operations like pull, merge, commit, push, etc. Sourcetree application is open-source and available on various platforms including Windows, Mac, and Linux. Ultimately, Sourcetree is a powerful tool that enhances the productivity of developers and streamlines their workflow.Â
Installing Sourcetree on Ubuntu
Follow the below steps to install the Sourcetree application on the Ubuntu system without facing any issues.Â
Step 1: Update Your Ubuntu System
Firstly, update the system to refresh the package manager index cache. Execute the below command in the terminal to update the system using apt manager.
sudo apt update
 Step 2: Install Wine on Ubuntu
As we know SourceTree is not directly available for Linux, therefore to install it we are using Wine on Linux. So using the below command, we can download Wine on the system. Run the command to install wine.
wget -nc https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
Install Wine on UbuntuStep 3: Move Wine Configuration File to Sources Directory
After installing Wine, we will move the repository configuration file of Wine to the sources.list.d directory.Â
sudo mv winehq-jammy.sources /etc/apt/sources.list.d/
Move Wine Configuration File to Sources DirectoryStep 4: Create a Keyrings Directory
Now, we will create a keyrings directory with specific permissions. Execute the below command, to create the directory in the /etc/apt directory.Â
sudo mkdir -pm755 /etc/apt/keyrings
Create a Keyrings DirectoryStep 5: Download WineHQ GPG Key
Now, we will download the GPG key for the WineHQ repository and will save it in the keyrings directory that we have created in the above step.Â
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
Download WineHQ GPG KeyStep 6: Install WineHQ Staging
By using the below command, we will install the WineHQ Staging package on the Ubuntu system along with the recommended packages that are needed for it to work properly.Â
sudo apt install --install-recommends winehq-staging
Install WineHQ StagingStep 7: Download Sourcetree for Windows
Visit the below site, to download the Sourcetree tool as it is not available as the Debian library, we will download the executable binary available for Windows.
https://www.sourcetreeapp.com/
 Step 8: Launch Sourcetree Installation Using Wine
After downloading the file using the web browser, it will be shown in the Downloads directory. We can launch the application for configuration from the terminal itself. Execute the below command in the terminal to launch the application for config.
wine ~/Downloads/SourceTreeSetup-*.exe
Launch Sourcetree Installation Using WineConfiguring Sourcetree on Ubuntu
After launching the installer, follow the steps below to complete the setup of Sourcetree on your Ubuntu system.
Step 1: Run the Sourcetree Installation Wizard
Once you have launched the application, you will see the Installation Wizard of Sourcetree as shown in the below screenshot. You can connect to the BitBucket otherwise, you can skip the process and move forward.
Run the Sourcetree Installation WizardStep 2: Install Git and Mercurial Tools
As Sourcetree supports Git and Mercurial applications, we can install any of them or both. Just click on the tools to install and click Install.Â
Install Git and Mercurial ToolsStep 3: Set Up Your Username
After downloading, you will see the success message as shown below screenshot. You can click on the Next button to set your username.
Set Up Your UsernameStep 4: Finish the Installation
After clicking on the Next button, the application will choose an automatic username for you. You can rename the username as per your wish. After setting the username, you can click on Next to enter the application for usage.Â
Finish the InstallationStep 5: Successful installation
Below you can see that, we have successfully installed and configured the Sourcetree application on Ubuntu without facing any error while installing.Â
Conclusion
Although Sourcetree is primarily built for Windows and macOS, Linux users can still enjoy its benefits by using Wine. With Sourcetree, developers can manage version control, collaborate more effectively, and improve their productivity—all from a single, user-friendly application.
Similar Reads
How to Install RawTherapee on Ubuntu?
RawTherapee is application software that allows you to process images in raw image formats, such as those produced by many digital cameras. It is a subset of image editing processes intended specifically at non-destructive post-production of raw photos, with the primary goal of enhancing a photograp
2 min read
How to Install alsa-source package on Ubuntu?
This package provides the ALSA driver source code. Using the m-a utility, the source code can be compiled into an alsa-modules package (available in the module-assistant package). Please keep in mind that the kernel headers are required to compile these modules. For additional details on loading and
2 min read
How to Install Sublime Text Editor on Ubuntu?
Sublime Text is a popular and highly efficient source code editor that has won the hearts of developers worldwide. Known for its speed, versatility, and user-friendly interface, Sublime Text provides a seamless coding experience for both beginners and seasoned developers. With support for multiple p
3 min read
How to install make on Ubuntu
The "make" program in Linux is used to compile and manage a set of source code applications and files. It allows developers to install and gather a range of apps via the terminal. It also controls and cuts down on the amount of time necessary for compilation. The basic objective of the make command
3 min read
How to Install NVM on Ubuntu 22.04
Whether you are developing a web application, working with a Node.js-based project, or learning Node.js in general, NVM makes it easier to work with your Node.js environments in Ubuntu. In essence, NVM (Node Version Manager) is a useful tool for working with multiple versions of Node.js on your comp
5 min read
How to install Sublime Merge in Ubuntu/Linux?
If you want to use Git on Ubuntu OS for more advanced projects or applications, then one of the Best Git Clients should be used. This is known as the Subline Merge from the makers of Sublime Text. But to Work on Sublime Merge on Ubuntu, you must first Install the Sublime Merge Application on the Ubu
4 min read
How to Install apt-file package on Ubuntu?
Apt-file is a software program that indexes the contents of packages in your accessible repositories and allows you to search for a certain file among all available packages. Apt-file is a command-line utility for searching files in APT packages. You may search for which package a file is in or show
2 min read
How To Install Git on Ubuntu 20.04
Git, a popular version control system, is widely used for managing code in software development projects. It tracks changes in code, allowing collaboration and easy reversion to previous versions if needed. This article will outline two methods for installing Git on your Ubuntu system. Table of Cont
3 min read
How to install CLion IDE on Ubuntu
CLion (pronounced "sea lion") is a Linux, macOS, and Windows C and C++ IDE that is integrated with the CMake build system. The GNU Compiler Collection (GCC) and Clang compilers, as well as the GDB debugger, LLDB, and Google Test, are all supported in the first edition. JetBrains' CLion is one of the
4 min read
How to Install Node.js on Linux
Installing Node.js on a Linux-based operating system can vary slightly depending on your distribution. This guide will walk you through various methods to install Node.js and npm (Node Package Manager) on Linux, whether using Ubuntu, Debian, or other distributions. PrerequisitesA Linux System: such
6 min read