Easy Tutorial
❮ Git Diff Git Quiz ❯

Sourcetree Usage Tutorial

There are many graphical interface tools (GUI) for Git, such as SourceTree, Github Desktop, TortoiseGit, etc.

SourceTree is a Git client management tool suitable for Windows and Mac systems.

SourceTree simplifies the way developers interact with code repositories using Git. We can easily handle Git operations through the interface menu without using commands.

With SourceTree, we can manage all Git repositories, whether remote or local. SourceTree supports remote repositories like Bitbucket, GitHub, and Gitlab.


Installing Sourcetree

We can download directly from the Sourcetree official website https://www.sourcetreeapp.com/ by clicking the download button.

Other versions can be found at: https://www.sourcetreeapp.com/download-archives

After downloading, unzip the ZIP file and double-click the application file (EXE for Windows or DMG for Mac) to install.

During the installation process, we only need to agree to the Atlassian Customer Agreement and click Continue.

Creating a Bitbucket account can skip the initial setup, load SSH keys, which will be automatically loaded if available, or can be set up later.

Follow the prompts until you complete the setup. If you are not ready to clone a repository, click Skip Setup.


Connecting to Github Account

If you do not have a Github account, you need to create one. Refer to Git Remote Repository (Github) for guidance.

Next, we will introduce how to manage our Github account using SourceTree.

We can add multiple accounts to SourceTree.

Click the button in the upper right corner and select Accounts.

Next, add your Github account via the add account button.

After adding the Github account, you can directly clone your own account:

You can also clone other remote repositories:

After cloning, you can perform operations such as committing, pulling, and merging:


Creating a Local Repository

Click New, then select Create Local Repository.

Enter your target path and repository name, then click Create.

Once created, it will appear in the local list:

If we already have a repository locally, we can directly add it.

Click New, then click Add Existing Local Repository:

❮ Git Diff Git Quiz ❯