Git's good partner: SourceTree & BeyondCompare

Git's good partner: SourceTree & BeyondCompare

As a coder, you must be familiar with source code control management systems (SCM). For example, I have used VSS->SVN->Git. Other famous ones include CVS and Mercurial. In the era of mobile Internet, Git has basically become the only choice for everyone (Github has contributed greatly to this).

Today I will not introduce the benefits and usage of Git, but mainly introduce two good tools for use with Git

  • SourceTree
  • BeyondCompare

SourceTree

As a lazy person, I don’t like Git’s command line, so GUI tools have become my first choice.
There are many Git tools for Mac. The famous ones include Tower SmartGit and so on (for more information, please see the introduction here)

Today we are introducing SourceTree, a product of Atlassian, as well as the famous tracking tool JIRA and Github's competitor Bitbucket, etc. (I also use these two frequently, especially BitBucket supports free private repositories~)

The features of SourceTree are as follows

  • free
  • SourceTree is free to use, just register
  • Cross-platform
  • Available for both Windows and Mac
  • Perfect support for Github and Bitbucket
  • All my projects on Github and Bitbucket are managed with it. Of course, the company's projects are also managed with SourceTree without any interference.
  • Support Git Flow

Git Flow (translated version) is a set of practices for using Git. It has now been widely recognized and promoted. If used properly, the development management process will become easier and clearer.

This is the Repo list interface of SourceTree. It is also the default interface when it is opened. Here you can manage all Repos in a unified way and also support grouping.
[[142579]]

This is the Repo details interface of SourceTree. This is where you can operate on a specific Repo. You can perform all Git operations on the GUI very conveniently.
[[142580]]

Please experience the specific details after using it yourself. I won’t go into details here.

BeyondCompare

My experience of using BeyondCompare can be traced back to many years ago (when I was still in a company in Shenzhen). Although most of the code was running on Linux, the company still chose to do cross-compilation on Windows. At that time, the development tools we used were SourceInsight + BeyondCompare (SourceInsight is also a magical tool. Students who have used it should know its advantages. Unfortunately, there was no Mac version and BC was still version 2.x at that time)

BeyondCompare is a very powerful file comparison tool (much better than the built-in ones in Xcode and SourceTree). If you have experience with Merge, you will definitely feel the pain when there are a lot of conflicts. BeyondCompare can help you solve this problem easily.

However, BeyondCompare has only supported Linux since Windows version 3.0 and Mac since version 4.0.

Next, let’s introduce how to integrate BeyondCompare in SourceTree

  1. Install BeyondCompare first (please support genuine version)
  2. Open SourceTree's Preferences and select Diff. Under External Diff/Merge, make the following settings:
    Visual Diff Tool: Other
    Diff Command: /usr/local/bin/bcomp
    Arguments: \$LOCAL \$REMOTE

    Merge Tool: Other
    Merge Command: /usr/local/bin/bcomp
    Arguments: \$LOCAL \$REMOTE \$BASE \$MERGED

  3. Open the terminal and enter the command
  1. ln -s /Applications/Beyond\ Compare.app/Contents/MacOS/bcomp /usr/local/bin/

This completes the setup. When there is a conflict, select Resolve Conflicts -> Launch External Merge Tool in the menu to open BeyondCompare for the Merge operation.

summary

If you want to do your work well, you must first sharpen your tools. Good development tools can help you get twice the result with half the effort, saving precious time so that you can work less overtime (ノ>ω<)ノ(It doesn't matter)

<<:  iOS development knowledge system

>>:  Regarding iOS multithreading, it is enough for you to look at me

Recommend

Baidu bidding OCPC delivery and optimization guide!

What I want to talk about today is search OCPC. I...

Community operation: How to build a high-quality and active community?

By sharing practical experiences from 5 communiti...

Outsourcing order-taking platform, where can SEOs take outsourcing work?

SEO is a profession and also a job. The purpose o...

Tesla's new promotional method: It turns out that cars can be sold like this

Beijing time, July 30 morning news, Tesla announc...