In this guide, we will show you how to install Sublime Merge on Ubuntu systems
Sublime Merge is a git client. It allows to read a git repository in order to display the differential of the last modifications, the list of submissions (commits) and the branches, among other things.
It is possible to submit (push) and retrieve (pull) modifications from the interface
Sublime Merge includes a command line tool, smerge, to work with repositories on the command line. This can be used to open repositories, search, and merge files.
Install Sublime Merge
Follow the steps below to get started with Sublime Merge:
- Update your Ubuntu system packages with running the below command:
sudo apt update -y && sudo apt upgrade -y
- Sublime Merge package is not available on Ubuntu base repository. So You can install it via importing the Sublime Merge repository to your Ubuntu system:
echo 'deb [signed-by=/usr/share/keyrings/sublime.gpg] https://download.sublimetext.com/ apt/stable/' | sudo tee -a /etc/apt/sources.list.d/sublime-text.list
Also import the GPG key by running the command below:
sudo wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/sublime.gpg
- Install Sublime merge
sudo apt update
sudo apt install sublime-merge
Also you can install it with snapd manager:
Snap is a software packaging and deployment system developed by Canonical for operating systems that use the Linux kernel. The packages, called snaps, and the tool for using them, snapd, work across a range of Linux distributions and allow upstream software developers to distribute their applications directly to users. Snaps are self-contained applications running in a sandbox with mediated access to the host system.
So, Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.
- Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions, So install snap then install Sublime Merge via snap manager as shown below
sudo apt update sudo apt install snapd sudo snap install sublime-merge --classic
- Access Sublime merge by searching on the system search bar by typing Sublime Merge as follows
- Also you can access Sublime merge through the command line by running the command
- Sublime Merge will be launched as shown below
Enter the Source URL of the repository then click on Clone button
Run smerge –help:
Git Merge Tool Setup
The merge tool can be used to process merge conflicts within a Git repository from the command line.
After configuring smerge using the instructions above, run the following from the repository directory:
git config mergetool.smerge.cmd 'smerge mergetool "$BASE" "$LOCAL" "$REMOTE" -o "$MERGED"'
git config mergetool.smerge.trustExitCode true
git config merge.tool smerge
Git Merge Tool Usage
To invoke the merge tool, run
That’s it, I hope that was useful.