The use of Git graphical interface

Source: Internet
Author: User
Tags using git github mac

If you already know a lot about using Git command-line operations. You learned to operate local files, connect your warehouses over the Internet, and collaborate effectively with others. But the story does not end there; Git is usually just part of a larger ecosystem, and in some cases using a terminal is not the most appropriate way. Now let's look at how to better use git in other types of environments, and how other apps (including yours) can collaborate with Git.

650) this.width=650; "title=" Git graphical interface using git graphical interface using "alt=" git graphical interface using git GUI use "class=" AlignCenter "src=" https:// "style=" vertical-align:middle;height:auto;margin:10px auto; " />

Graphical interface

The native environment of Git is the terminal. There, you can experience the latest features, and only there, you will be able to play the full power of Git. But for some tasks, plain text is not the best choice; sometimes you really need a visual presentation, and some users are more accustomed to the clickable interface.

One thing to note is that different interfaces are designed for different workflow processes. Some client authors have chosen to support a workflow that he thinks is efficient, showing only a subset of the Git functionality. Each tool has its specific purpose and meaning, and from this point of view, it cannot be said that a tool is "better" than the other. Also please note that there is nothing that the GUI client can do and the command line client cannot do; the command line is always the place where you can fully manipulate the warehouse and exert all the power.

GITK and Git-gui

While installing Git, you've also installed the visualizer, GITK, and Git-gui that it provides.

GITK is a graphical viewer of history, and you can think of it as a powerful graphical interface based on git log and git grep commands, and you'll use this tool when you need to find a record that happened in the past or visualize the history of your project.

The simplest way to use GITK is to open it from the command line, just CD to a Git repository and type:

$ GITK [git log options]

GITK can accept many command-line options, most of which are passed directly to the underlying git log. --all may be one of the most useful of these, and it tells GITK to go as far as possible from any reference to find commits and displays, not just from the HEAD,GITK interface that looks long like this

650) this.width=650; "title=" Git graphical interface using git graphical interface using "alt=" git graphical interface using git GUI use "src=" Book/a-git-in-other-environments/images/gitk.png "style=" vertical-align:middle;height:auto;margin:10px auto; "/ >

GITK History Viewer

This image looks just like the output of the git log--graph command: Each point represents a commit, the line represents a parent-child relationship, and a colored block is used to indicate a reference. Huang represents HEAD, and the red dot represents a local change that has not yet been committed. The window below is used to display the details of the currently selected submission; comments and patches appear on the left, and the summary appears on the right. The middle is a set of controls to search for history.

In contrast, Git-gui is primarily a tool for making submissions. The simplest way to open it is also to start from the command line:

$ git GUI

Its interface looks like this:

650) this.width=650; "title=" Git graphical interface using git graphical interface using "alt=" git graphical interface using git GUI use "src=" Book/a-git-in-other-environments/images/git-gui.png "style=" vertical-align:middle;height:auto;margin:10px auto; " />

Git-gui Submission Tool

The left side is the index area, and the unsaved changes appear above, and the staged changes appear below. You can switch between staging and not staging by clicking the icon to the left of the file name, or you can view its details by selecting a file name.

The right side of the window is displayed in diff format to show where the currently selected file has changed, and you can put this chunk or row into staging area by right-clicking a chunk or row.

At the bottom of the right window is the place to write the log and perform the action, type the log in the text box and then click "Submit" to perform the same effect as Git commit. If you want to revise the last commit, you can check the "Track Changes" button and the last commit will be displayed in "Staging area". Then you can simply scratch and cancel the staging operation, update the commit log, and then click "Submit" again to overwrite the last commit with this new commit.

GITK and Git-gui are two examples of tools designed for a particular task, which are streamlined for different purposes (i.e. viewing history and making submissions), omitting functionality that is not available.

GitHub client on Mac and Windows

GitHub has released two workflow-oriented Git clients: Windows Edition, and Mac edition. They're a great way to show what a workflow-oriented tool should be-focus on improving the usability of common features and their collaboration, rather than implementing all of Git's features, which look like this:

650) this.width=650; "title=" Git graphical interface using git graphical interface using "alt=" git graphical interface using git GUI use "src=" Book/a-git-in-other-environments/images/github_mac.png "style=" vertical-align:middle;height:auto;margin:10px auto; "/>

GitHub MAC Client

650) this.width=650; "title=" Git graphical interface using git graphical interface using "alt=" git graphical interface using git GUI use "src=" Book/a-git-in-other-environments/images/github_win.png "style=" vertical-align:middle;height:auto;margin:10px auto; "/>

GitHub Windows Client

As we design, we strive to align both appearance and operational experience, so this chapter will introduce them as the same product. We don't cover every feature of the tool in detail (because they have documents themselves), but take a quick look at the following points in the Change window (which you spend most of your time using this window):

    • On the left is a list of the warehouses being traced, and by clicking the "+" icon at the top left, you can add a repository that needs to be tracked (either through clone or locally).

    • The middle is the input-submission area, where you can enter the commit log and select which files need to be submitted. (On Windows, commit history appears below the region; on Mac, commit history has a separate window)

    • The right side is the Edit view area, which tells you which items in your working directory have been modified (edit mode), or what changes are included in the selected submission (historical mode).

    • Finally, you need to be familiar with the "Sync" button in the top right corner, you are mainly using this button to interact on the network.

Note: You do not need to register a GITHUB account to use these tools. While they are designed to work on GitHub's recommended workflows and highlight some of the GitHub service experiences, they can work well on any Git repository and can be connected to any GIT host over the network.


GitHub's Windows clients can be downloaded from and MAC clients can be downloaded from . When you first open the software, it guides you through a series of first-time usage settings, such as setting your name and email, and it intelligently adjusts some of the common default settings, such as credential caching and CRLF processing.

They are all "green software"--if the software opens and updates are found, the downloads and installs of the upgrade package are done in the background, and for convenience they pack a copy of Git, which means that once you install it, you don't need to upgrade. The Windows client also provides a shortcut to launch Powershell with the Posh-git plugin, which we'll cover in more detail later in this chapter.

Next we set up some work warehouses for it. The client displays a list of warehouses that you have permission to operate on GitHub, and you can select one and then clone it. If you have a local repository, you can simply drag it from the Finder or Windows Explorer into the GitHub client window to add the repository to the repository list on the left.

Recommended Work Flow

Once installed and configured, you can use the GitHub client to perform some common Git tasks. The workflow recommended by the tool is sometimes referred to as the "GitHub stream". We've covered this in more detail in the GitHub process section, with the point that (a) you will submit to a branch; (b) You need to keep in sync with the remote repository often.

Clients on two platforms differ in branch management. On your MAC, create a branch button above the window:

The Create Branch button on your MAC

On Windows, you can complete the creation by entering the name of the new branch in the branch switch pendant:

650) this.width=650; "title=" Git graphical interface using git graphical interface using "alt=" git graphical interface using git GUI use "src=" Book/a-git-in-other-environments/images/branch_widget_win.png "style=" Vertical-align:middle;height:auto;margin : 10px auto; "/>

Create a branch on Windows

Once the branch is created, the new commit becomes straightforward. Now make some changes in the working directory, then switch to the GitHub client window, and your changes will be displayed there. Enter the submission log, select the files that need to be included in this submission, and then click the Submit button (you can also press Ctrl-enter or-enter on the keyboard).

The "Sync" feature is the main way you interact with other warehouses on the web. Push,fetch,merge, and Rebase are a series of independent operations within Git, and the GitHub client merges these operations into a single function. When you click the Sync button, the following actions actually occur:

Git pull--rebase. If the above command fails because of a merge conflict, the Git pull--no-rebase will be retired. git push.

If you follow the recommended workflow, these are the most commonly used series of commands, so merging them into one makes things a lot easier.


These tools are tailor-made for their respective workflows, and developers and non-developers can easily build project collaboration environments in minutes, and they also have built-in support for other best practices. However, if your workflow is different, or if you need more control over network operations, it is recommended that you consider other clients or use the command line.

Other graphical interfaces

In addition, there are many other graphical Git clients, ranging from a single-function customization tool to a complex application that tries to provide all the functionality of Git. Git's official website has compiled a list of the most popular clients Http:// You can also see a more complete list at Git's wiki site Https://,_frontends,_and_tools#Graphical_ Interfaces

This article was reproduced from:

Free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better:

The use of Git graphical interface

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.