MacWindowsSoftwareSettingsProductivitySecurityLinuxAndroidPerformanceAppleConfiguration All

How to Use GitKraken on Linux

Edited 26 days ago by ExtremeHow Editorial Team

GitKrakenLinuxOSGitVersion ControlCompatibilityInstallationConfigurationSoftwareOpen Source

How to Use GitKraken on Linux

This content is available in 7 different language

GitKraken is a popular graphical user interface (GUI) client for Git, a version control system used by developers to track changes to their codebase. GitKraken is known for its intuitive interface and powerful features that make it easier for developers to manage Git repositories. In this guide, we will learn the process of installing and using GitKraken on the Linux operating system.

Prerequisites

Before getting started with GitKraken, make sure you have these pre-requisites:

Installing GitKraken on Linux

GitKraken can be installed on Linux in several ways, including using a package manager or downloading a standalone package. Below are the steps for different installation methods:

Method 1: Install via package manager

For distributions like Ubuntu, you can use a package manager to install GitKraken. This method is straightforward and ensures that you get the latest updates automatically.

Step 1: Add the Snap Store

GitKraken is available on the Snap Store, a software app store for Linux. To install it, first make sure you have the Snap package system installed on your machine. If it doesn't, you can enable it with these commands:

sudo apt update sudo apt install snapd

After installing Snap, you may need to restart your machine for the changes to take effect.

Step 2: Install GitKraken

With Snap enabled, you can now install GitKraken by running the following command in your terminal:

sudo snap install gitkraken

This command fetches and installs GitKraken from the Snap store. This may take some time depending on your internet speed.

Method 2: Install via DEB package

If you prefer to install via DEB package, you can download this package directly from the GitKraken website and install it using dpkg.

Step 1: Download the DEB package

Visit the official GitKraken website and download the DEB package. The download link is usually found on the download page.

Step 2: Install the DEB package

Once downloaded, go to the download directory and install the package using the following command:

sudo dpkg -i gitkraken-amd64.deb

If you encounter any dependency errors during installation, run the following command to resolve them:

sudo apt-get install -f

Method 3: Install via RPM package

For Fedora or other RPM-based distributions, use the RPM package.

Step 1: Download the RPM package

Similar to DEB packages, you can download RPM packages from the GitKraken website.

Step 2: Install the RPM package

Use the following command to install the package:

sudo rpm -i gitkraken-amd64.rpm

This installs GitKraken and all required dependencies on your system.

The launch of GitKraken

Once GitKraken is installed, you can launch it from your Applications menu or by typing gitkraken in the terminal. The GitKraken application window will open, and you will be asked to create a GitKraken account or log in using an existing account. This account provides access to various GitKraken services and features.

Interface overview

The GitKraken interface is designed to be user-friendly and powerful, while providing the user with the necessary functionalities to effectively manage their Git repositories. Let's take a look at the main parts of the interface:

Working with repositories

Working with repositories is the main function of GitKraken. Here we will discuss how to manage repositories, make commits, and handle branches using GitKraken.

Creating a new repository

To create a new repository in GitKraken, follow these steps:

  1. Click the "File" menu in the top menu bar.
  2. Select "New Repository".
  3. In the resulting dialog, specify the folder location where you want to initialize the repository.
  4. Define other necessary repository settings, such as adding a .gitignore file (a text file that tells Git which files or directories to ignore) or a README file (which is usually included in a git repository).
  5. Click “Create Repository” to finalize the setup.

Cloning an existing repository

Cloning a repository creates a local copy of the remote repository on your machine. To clone a repository using GitKraken:

  1. On the main dashboard, click “Clone Repo.”
  2. Enter the URL of the repository, or, if you're using an integrated Git host such as GitHub, use the integrated browsing feature to select a repository.
  3. Specify the local path where the repository will be cloned.
  4. Click “Clone Repository” to download the repository contents to your system.

Committing to change

Committing a change means you are saving your progress to the repository's history. This snapshot of your work can be accessed later. Here's how to commit a change in GitKraken:

  1. Once you make changes to your files, you’ll see these listed as uncommitted changes.
  2. Select the changes you want to include in the commit. You do this by staging them. Click on the file in the `Unstaged Files` section to stage it.
  3. Type a commit message describing your changes in the Commit panel.
  4. Click "Commit changes to [branch name]".

This action creates a new commit, which is represented as a node in the commit graph.

Branching and mergers

Branches allow multiple lines of development to exist independently of each other. Merging is to combine these lines later. Here is how branches are managed in GitKraken:

Creating a new branch

  1. In the Branches panel, right-click an existing branch.
  2. Select "Checkout new branch".
  3. Enter the name of the new branch and confirm the operation.

This action will create a new branch and switch your current working branch to this new branch.

Merging of branches

  1. Go to the branch you want to merge the changes into.
  2. Drag the branch you want to merge onto the target branch in the Branches panel.
  3. Confirm the merge operation.

After a successful merge, GitKraken updates the commit graph to reflect the merge operation.

Managing the remote

Remote repositories are versions of your project that are hosted online or in a network. Managing them with GitKraken allows you to coordinate between local and remote copies.

Pairing a remote

  1. In the Branches or Remotes panel, click the "Add Remote" button.
  2. Specify the remote URL and give it a name.
  3. Click “Add Remote” to save.

Pushing and pulling changes

Pushing sends changes to a remote repository, while pulling brings changes from the remote repository to your local repository.

Push changes

  1. After committing, click the "Push" button in the top bar.
  2. Confirm the push dialog. GitKraken pushes your changes to the remote repository.

Drag changes

  1. Make sure your branch is in sync with the remote repository's branch.
  2. Click the "Pull" button, or drag the branch in the commit graph to another branch to merge its changes.

GitKraken advanced features

Beyond basic Git operations, GitKraken offers advanced features for experienced developers:

Conclusion

GitKraken is a powerful tool for managing Git repositories with an intuitive graphical interface. Whether you are new to version control or an experienced developer, GitKraken provides excellent tools to easily handle branches, commits, and collaboration. By following the guide above, developers on Linux systems can successfully install, run, and use GitKraken for their version control needs.

If you find anything wrong with the article content, you can


Comments