- Git:Mastering Version Control
- Ferdinando Santacroce Aske Olsson Rasmus Voss Jakub Nar?bski
- 1636字
- 2021-07-08 10:46:58
Chapter 7. Git Resources
This chapter is a collection of resources I built during my experience with Git. I will share some thoughts about GUI tools, web interfaces with Git repositories, and learning resources, hoping they will act as a springboard for a successful Git career.
Git GUI clients
When beginning to learn a new tool, especially a wide and complex one like Git, it can be useful to take advantage of some GUI tools that are able to picture commands and patterns in a way that is more simple to understand.
Git benefits from a wide range of GUI tools, so it's only a matter of choice. I want to tell you right away that there is no perfect tool, as frequently happens, but there are enough of them to pick the one that fits your needs better.
Windows
As a Microsoft .NET developer, I use Windows 99 percent of the time. In spare time, I play a little bit with Linux, but in that case I prefer to use the command line. In this section, you will find tools I use or I have used in the past, while in the other platform section I will provide only some hints based on words of other people.
Git GUI
Git has an integrated GUI, as we learnt from the previous chapters. Probably, it is not one of the most eye-catching solution you will find, but for small issues it can be enough. The reason for using it is that it is already installed when you install Git, and that it is well integrated even with the command prompt; so for blaming files, see history or interactive merging can be fired easily (just type git gui <command>
on your shell). But I have to come clean: I don't like it much.
In Windows, Git GUI will be installed following the language or the region you specified on Windows. What's the problem? Well, the problem is that in non-English languages, they translate everything - even command names! In Italian, instead of merge I see Fusione; pushing gets translated as Propaga; and untracked files become Modifiche non preparate. The problem is not the translation itself, but simply that I find translating concepts or command names (like even Windows and other Microsoft tools did in the past) perplexing; it is confusing and counterproductive.

TortoiseGit
If you have migrated from using Subversion to using Git, you have probably already heard about TortoiseSVN, a well-crafted tool for dealing with Subversion commands directly from Explorer, through the right-click shell integration.
TortoiseGit brings Git, instead of Subversion, to the same place. By installing TortoiseGit, you will benefit from the same Explorer integration, leaving most Git commands only a step away from you. Even if I discourage you to use localized versions, TortoiseGit is available in different languages. Also, bear in mind that you need to install Git in advance as it is not included in the TortoiseGit setup package.

GitHub for Windows
GitHub offers a stylish Modern UI based client. I have to admit that I snubbed it at first, mostly because I was sure that I could use it only for GitHub repositories. However, I realized that one can use it even with other remotes, but it's clear that the client is tailored for GitHub. To use other remotes, you have to edit the config file by hand, substituting the GitHub remote with the one you want.
If you want a general purpose client, probably this is not the best tool for you; but if you work mostly on GitHub, it may likely be the best GUI in the market.

Atlassian SourceTree
This is my favorite client. SourceTree is free like all the other tools; it comes from the mind of Atlassian, the well-known company behind Bitbucket and other popular services like Jira, Confluence, and Stash. SourceTree can handle all kinds of remotes, offering facilities (like remembering passwords) to access the most popular services like Bitbucket and GitHub.
It embeds the GitFlow way of organizing repositories by design, offering a convenient button to initialize a repository with GitFlow branches, and integrating GitFlow commands provided by the author. The most interesting thing I found at first was that you can enable a window where SourceTree shows the equivalent Git command when you use some of Git commands by user interface; in this manner, when you doubt you can remember the right command for the job, you can use SourceTree to accomplish your task and see what commands it uses to get the work done.

SourceTree is available even for Mac OS X.
Cmder
Cmder is not really a Git GUI, but a nicer portable console emulator you can use instead of the classic Bash shell:

It looks nicer than the original shell; it has multi-tab support and a wide set of configuration options to let you customize it as you prefer, thanks to ConEmu and Clink projects. Finally yet importantly, it comes with Git embedded. You can download it from GitHub at https://github.com/bliker/cmder.
Mac OS X
As I already said, I have no experience with Mac OS X Git clients; the only information I can share with you is that GitHub offers its client for free, even for Mac, like it does Atlassian with SourceTree. There is no TortoiseGit for Mac, but I have heard about a cool app called Git Tower. Please consider giving it a try as it seems very well crafted.

Another great tool is SmartGit, available for free for open-source projects: http://www.syntevo.com/smartgit/
Linux
Linux is the reason for Git, so I think that it is the best place to work with Git. I play with Linux now and then, and I usually use the Bash shell for Git.
For the ZSH shell lover, I suggest looking at http://ohmyz.sh/, an interesting open source project where you can find tons of plugins and themes. About plugins, there are some of them that let you enhance your Git experience with this famous alternate console.
You can take a look at some Git GUI for Linux at
http://git-scm.com/download/gui/linux
Building up a personal Git server with web interface
In the office where I work, I was the first person who started to use Git for production code. At some point, after months of little trials in my spare time, I gained courage and converted all the Subversion repositories, where I usually work alone, into Git ones.
Unfortunately, firm IT policies forbid me to use external source code repositories; so no GitHub or Bitbucket. To make things even worse, I also could not obtain a Linux server, and take advantage of great web interfaces like Gitosis, GitLab, and so on. So I started to Google around the web for a solution, and I finally found a solution that can be useful for people in a similar condition.
The SCM Manager
SCM Manager (very easy solution to share your Git repositories in a local Windows network. It offers a standalone solution to install and make it work on top of Apache Web Server directly in Windows. Though it is built in Java, you can make it work even in Linux or Mac.
It can manage Subversion, Git, and Mercurial repositories, allowing you to define users, groups, and so on. It has a good list of plugins too for other version control systems and other development related tools like Jenkins, Bamboo, and so on. There's also a Gravatar plugin and an Active Directory plugin, to let you and other colleagues use default domain credentials to access your internal repositories.
I've been using this solution for about two years without a hitch, excluding only some configuration related annoyances during updates, due to my custom path personalization.

Learning Git in a visual manner
The last thing I would like to share with readers is a web app I found useful at the very beginning, to better understand the way Git works.
LearnGitBranching ( that at the right side of the page, you will see a funny repository graph evolving in real time, following the commands you type in the emulated shell.

Git on the Internet
In the end, I would suggest you to follow some resources that I usually follow to learn new things and get in touch with other smart and funny Git users over the Internet.
Git community on Google+
This community is full of people who are happy to share their knowledge with you; most of the coolest things I know about Git have been discovered here, at:
https://plus.google.com/u/0/communities/112688280189071733518
GitMinutes and Thomas Ferris Nicolaisen's blog
Thomas is a skilled Git user, and a very kind person. On his blog, you will find many interesting resources, including videos where he talks about Git at local German programming events.
More than this, Thomas runs GitMinutes podcast series, where he talks about Git with other people, discussing general purpose topics, tools opinions, and so on.
Take a look at www.tfnico.com and www.gitminutes.com.
Ferdinando Santacroce's blog
On my personal blog, with readers some things I discovered using Git, quick techniques to get the job done, and how to recover from weird situations.
Summary
In this chapter, we went through some Git GUI clients. Even if I encourage people to understand Git by using shell commands, I have to admit that for most common tasks, using a GUI based tool makes me feel more comfortable, especially when diffing or reviewing history.
Then we discovered that we could obtain a personal Git server with a fancy web interface: the Internet has plenty of good pieces of software to achieve this target.
At the end, like my last suggestion, I mentioned some good resources to enhance your Git comprehension: all the knowledge fields, hearing the voice of the experts, and asking them questions is the most effective way to get your work done.
- Android Wearable Programming
- The Android Game Developer's Handbook
- Visual Basic程序開發(學習筆記)
- 深入淺出Java虛擬機:JVM原理與實戰
- Network Automation Cookbook
- BeagleBone Media Center
- MariaDB High Performance
- 學Python也可以這么有趣
- 信息技術應用基礎
- 表哥的Access入門:以Excel視角快速學習數據庫開發(第2版)
- 區塊鏈技術進階與實戰(第2版)
- iPhone應用開發從入門到精通
- QGIS Python Programming Cookbook(Second Edition)
- 編程可以很簡單
- Scratch從入門到精通