Gui For Git Mac

Posted onby

One of the best Git GUI clients for Windows is the Github Desktop, which has been. SourceTree is a Git GUI tool developed by Atlassian, the creators of BitBucket. It is a free Git GUI tool for Mac and Windows. Since BitBucket supports both Git and Mercurial, the SourceTree application can manage a repository that uses either of these version control systems. Git-flow support Git-flow provides a consistent development process by defining a strict branching model that is great for managing large projects. SmartGit allows setting up and integrating into repos that follow this model. Platforms: Mac, Windows. License: Proprietary. Unleash GitKraken, the free Git GUI for Windows, Mac & Linux! This intuitive Git GUI simplifies and streamlines Git processes.

Introduction

Remembering many git commands and also doing it in the terminal can be hard if you don't have too much practice. Graphical User Interfaces (GUI's) can make your life easier and improve your productivity. One of that is the Sourcetree.

Sourcetree is a free Git client for Windows and Mac that simplifies how you interact with your Git repositories so you can focus on coding. It enables you visualize and manage your repositories through a simple Git GUI.

Gui For Git Mac

In this post we will show how to run some git daily basis commands with the Sourcetree GUI.

Commmands

Log

Shows the commit logs.

Command: git log (doc)

In Sourcetree we can check the log in the History tab.

Commit

Record changes to the repository

Gui

Command: git commit -m <message> [--amend] (doc)

In Sourcetree you can achieve the same result clicking in the rounded Commit button at the top left corner, write the message in the text box and commit it by clicking the right bottom button.

Adding the amend option you will replace the tip of the current branch by creating a new commit. For doing this in Sourcetree you need select the Commit Options in the right top of the commit input box and select the option Amend last commit.

Diff

Show changes between commits, commit and working tree, etc

git diff <commit1> <commit2> (doc)

For doing the same in Sourcetree you just need select 2 commits in the History.

Stash

Use git stash when you want to record the current state of the working directory and the index, but want to go back to a clean working directory. The command saves your local modifications away and reverts the working directory to match the HEAD commit.

git stash push -m <message> (doc)

In Sourcetree for push a new stash you need select the Stash button in the top toolbar.

For apply or delete a stash you can use the Stashes menu in the sidebar.

Checkout

Switch branches or restore working tree files

Mac Git Tools

git checkout -b <branch> (doc)

In Sourcetree first you need right click in the commit you want and select the Branch option.

Then you just need add the branch name and confirm.

Add Remote

Adds a remote named <name> for the repository at <url>.

git remote add <name> <url> (doc)

For adding a remote you need first create a remote repository in some host service like Github or Bitbucket. For example, after create a repository on Github you have some like that:

To add this remote in Sourcetree first you need right click on the Workspace menu in the sidebar.

Then add the remote <name> (usually defined as 'origin') and <url> in the fields and click in OK. That's it. Your new branch is ready.

Merge

Join two or more development histories together

git merge <branch> (doc)

For merge branch in Sourcetree you just need right click in the branch commit that you want and choose the option Merge.

If you have some conflict you can also fix it by right clicking in the conflicted file, select the Resolve Conflicts and pick the desired option. Resolve Using 'Mine' means you want use the solution of your current branch and Resolve Using `Theirs' means you want replace the solution for the selected commit.

Mac

Squash

To Squash commits you should use rebase command in interactive mode. Rebasing interactively means that you have a chance to edit the commits which are rebased. You can reorder the commits, and you can remove them (weeding out bad or otherwise unwanted patches).

For

Start it with the last commit you want to retain as-is:

git rebase -i <after-this-commit> (doc)

An editor will be fired up with all the commits in your current branch (ignoring merge commits), which come after the given commit. You can reorder the commits in this list to your heart’s content, and you can remove them. The list looks more or less like this:

Best mac git client

How To Use Git Gui

You can squash commits changing the word pick into squash (or just s) next to it. The result would be:

For squash commits in Sourcetree first you need right click in the commit before that you want and select the option Rebase children of <commit> interactively....

Then select the commits you want squash and confirm. You can also edit the commit message if you want.

Git Gui For Mac Brew

Conclusion

In this post we learned some useful git daily commands (like commit, merge, stash, etc.) using the Sourcetree GUI. It enables you visualize and manage your repositories improving your productivity and making you focus on what matters: coding.

If you believe there is some command missing or have any other suggestion please let me know commenting below :).

Git comes with built-in GUI tools for committing (git-gui) and browsing (gitk), but there are several third-party tools for users looking for platform-specific experience.

If you want to add another GUI tool to this list, just follow the instructions.

  • SourceTree

    Platforms: Mac, Windows
    Price: Free
    License: Proprietary

  • GitHub Desktop

    Platforms: Mac, Windows
    Price: Free
    License: MIT

  • TortoiseGit

    Platforms: Windows
    Price: Free
    License: GNU GPL

  • Git Extensions

    Platforms: Linux, Mac, Windows
    Price: Free
    License: GNU GPL

  • GitKraken

    Platforms: Linux, Mac, Windows
    Price: Free / $29 / $49
    License: Proprietary

  • Magit

    Platforms: Linux, Mac, Windows
    Price: Free
    License: GNU GPL

  • SmartGit

    Platforms: Linux, Mac, Windows
    Price: $79/user / Free for non-commercial use
    License: Proprietary

  • Tower

    Platforms: Mac, Windows
    Price: $79/user (Free 30 day trial)
    License: Proprietary

  • GitUp

    Platforms: Mac
    Price: Free
    License: GNU GPL

  • GitEye

    Platforms: Linux, Mac, Windows
    Price: Free
    License: Proprietary

  • gitg

    Platforms: Linux, Windows
    Price: Free
    License: GNU GPL

  • ungit

    Platforms: Linux, Mac, Windows
    Price: Free
    License: MIT

  • git-cola

    Platforms: Linux, Mac, Windows
    Price: Free
    License: GNU GPL

  • Cycligent Git Tool

    Platforms: Linux, Mac, Windows
    Price: Free
    License: Proprietary

  • giggle

    Platforms: Linux
    Price: Free
    License: GNU GPL

  • Gitbox

    Platforms: Mac
    Price: $14.99
    License: Proprietary

  • Aurees

    Platforms: Linux, Mac, Windows
    Price: Free
    License: Proprietary

  • Fork

    Platforms: Mac, Windows
    Price: $49.99, free evaluation
    License: Proprietary

  • Working Copy

    Platforms: iOS
    Price: Free with in-app purchases
    License: Proprietary

  • CodeReview

    Platforms: Linux, Mac, Windows
    Price: Free
    License: GNU GPL

  • gmaster

    Platforms: Windows
    Price: Beta / Free for non-commercial use
    License: Proprietary

  • Git2Go

    Platforms: iOS
    Price: Free with in-app purchases
    License: Proprietary

  • GitAhead

    Platforms: Linux, Mac, Windows
    Price: Free
    License: MIT

  • Pocket Git

    Platforms: Android
    Price: 1.99€
    License: Proprietary

  • GitDrive

    Platforms: iOS
    Price: Free with in-app purchases
    License: Proprietary

  • GitX-dev

    Platforms: Mac
    Price: Free
    License: GNU GPL

  • GitBlade

    Platforms: Linux, Mac, Windows
    Price: Free Lite version, $59.99/user/year for PRO version
    License: Proprietary

  • Guitar

    Platforms: Linux, Mac, Windows
    Price: Free
    License: GNU GPL

  • RepoZ

    Platforms: Mac, Windows
    Price: Free
    License: MIT

  • Cong

    Platforms: Windows
    Price: Free
    License: Proprietary

  • Sublime Merge

    Platforms: Linux, Mac, Windows
    Price: $99/user, $75 annual business sub, free eval
    License: Proprietary

  • LazyGit

    Platforms: Linux, Mac, Windows
    Price: Free
    License: MIT

  • SnailGit

    Platforms: Mac
    Price: $9.99 / Lite version
    License: Proprietary

  • GitAtomic

    Platforms: Windows
    Price: 15.00€
    License: Proprietary

  • Gitfox

    Platforms: Mac
    Price: €3.99/m or €24,99/y per user
    License: Proprietary

  • GitFiend

    Platforms: Linux, Mac, Windows
    Price: Free
    License: Proprietary

  • NitroGit

    Platforms: Windows
    Price: 20€/user / Free for non-commercial use
    License: Proprietary

  • GitFinder

    Platforms: Mac
    Price: $24.95
    License: Proprietary

  • Vershd

    Platforms: Linux, Mac, Windows
    Price: Free trial, then $37
    License: Proprietary

  • GitUI

    Platforms: Linux, Mac, Windows
    Price: Free, but donations welcome
    License: MIT

There are other great GUI tools available as well. Have a look at the list of interfaces, frontends and tools in the Git Wiki.