Home » Software Development » Git » Installing Sourcetree for GIT

About Iulian Timis

Avatar photo
My name is Iulian and I graduated Faculty of Electronics, Telecommunications, and Information Technology. My master's degree was in Computer Science, Information Security. I am passionate about technology and the security area. During my career I was working as a Java Developer, on the backend and frontend side, sometimes doing some DevOps tasks.

Installing Sourcetree for GIT

1. Introduction

Working on a project with multiple teams that develops multiple features, you will need to have something like a version of control to be able to manage and integrate your changes into your project. Most of the IDEs are able to manage these code changes and view the differences. A useful tool that will be presented in this article is Sourcetree. More details about this software will be presented in the below sections.

2. What is Sourcetree?

Sourcetree is a Graphical User Interface (GUI) that will facilitate the interaction with a GIT repository with simple commands so that you can simply focus only on the code. This GUI makes it easy to visualize and manage your repository with a new level of confidence.

Advantages of Sourcetree

  • Utilize a simple user interface with most of the general GUI commands
  • Manage the GIT repository through a simple client
  • Simple commands for commit, push, or merge, just one click away
  • Additional support for Patch-Handling, Rebase, Regal, Cherry Picking
  • Connect to different version control like Bitbucket, Stash, Microsoft TFS, or GitHub.
  • Perform reviews directly from the interface
  • Checking your outgoing and incoming changesets
  • Customize changeset and stashes
  • Choose between branches
  • Apply patches, rebase or simply put your changes on shelves
  • Bookmarks given you a summarized view of all projects and repositories in real-time
  • Follow the detailed branching diagrams

3. What is GIT?

GIT is a free and open source software for version control, designed to manage projects from small to very large projects.

The original author is Linus Torvalds and the initial release was on 7 April 2005. This is a software for tracking changes in any set of files and coordinating work between programmers to develop a project. Its goals include speed, data integrity, and support for distributed non-linear workflows.

Git concept refers to having multiple local branches that can be entirely independent of each other. Managing branches to delete, create and merge takes seconds.

Most of the operations on GIT are performed locally, giving it a huge speed on centralized systems where it constantly has to communicate with a server. Git was built to work on the Linux Kernel. The source code of this is C, reducing the overhead of runtimes associated with higher-level languages. The primary goal for this was the performance from the beginning.

For more information about the GIT you can check out here and the official documentation here.

4. Installing Sourcetree Step-by-Step

This software is available on Windows and macOS. For the purpose of this demo, I will show how to install it on Windows machines step-by-step.

Firstly access the official website to download the latest version of this software.

Secondly, choose the platform where you want to install it.

After you downloaded successfully and launched the executable you will have two options: Registration as Bitbucket Server or Bitbucket. You can choose to skip this step.

Install page for Sourcetree
Fig.1: Install page for Sourcetree

At the Install, Tools step you will be able to install additional tools to manage a local repository like Git or Mercurial. After you finish this step, the next tab is for Preferences in the git config, what name/email should be shown in your git commits.

As a final step after you set up your preferences, you can choose to load the ssh key or to create a new one.

After everything is done you will be able to add a new git repository and handle all the actions through this friendly UI.

Interface to clone a repository
Fig. 2: Interface to clone a repository

5. Clone a new project with Sourcetree

To clone a repository from remote, you will have to press the Clone button, and set up the Source Path/URL, Destination Path, and a name for the cloned project. Besides that, you have Advanced options like checkout branch and Clone depth, recurse submodules and hard links. The default values for these options are master, 0, unchecked and unchecked. After you set up everything, press the Clone button to get the repo from the remote.

Interface to setup a clone repository
Fig. 3: Interface to setup a clone repository

After a successfully clone you will see something like this:

Interface with the cloned repository
Fig. 4: Interface with the cloned repository

6. Final words

This article will help you to understand the concepts of GIT as a version of control. Having that in mind will help to gain knowledge about this. Also in this article, we covered a GUI tool called Sourcetree that will help you to manage GIT commits/branches that are locally or remotely.

Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

 

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

6. Spring Interview Questions

7. Android UI Design

 

and many more ....

 

Receive Java & Developer job alerts in your Area

I have read and agree to the terms & conditions

 

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments