SourceTree和Github Desktop

SourceTree and Github Desktop are both graphical interfaces for managing the git code repository ( http://www.git-scm.com ). I recently found that SourceTree is quite easy to use, so I do some comparisons with Github Desktop.

SourceTree ( https://www.sourcetreeapp.com ) is a free git client software owned by Atlassian. The first thing I knew about this software was that about two or three years ago, in the App Store under the Mac, I saw that SourceTree was always ranked in the top ten in the free list of the developer tools category. At that time, I installed it and found that I didn't understand what software it was, and then I stopped paying attention.

From this year, I learned how to use git, opened an account on the github website, started coding under the management of git, and finally became a heavy git dependent. For those who do not understand the principles of git version control and have no experience in using it, it is difficult to grasp the usage of the git command on the command line. Fortunately, the github website provides a client software GitHub Desktop ( https://desktop.github.com ). The client software is still pretty beautiful. Although I thought about a silly question at the beginning, for example: Why can't I see all my code on this client software? Later, I finally mastered and understood the usage of the software. GitHub Desktop will manage each git code repository-a folder, as long as any change in the code is detected, such as changing a variable name and adding a file, the software will show which file in the code repository and which A line has changed, and the additions and deletions are marked by colors; then, through the commit button, record and submit the code changes this time to the code warehouse. In this way, every time the code is modified and a record is made, the purpose of version control of the code is achieved.

By understanding the usage of the GitHub Desktop client software, I gradually understood the principles and basic logic of git, and spawned some requirements that the client software could not complete, such as deleting a commit record. It is impossible to delete the commit record on the client software, but this requirement is not impossible to complete. To believe in the design of Linus (the developer of git software and the developer of Linux operating system)-but you need to use the command line To be done.

On this basis, I learned a lot of git command usage, such as:

git clone URL download git code repository

git commit -a Record code changes

git push Submit commits to remote sites, such as submitting changes to the github site

git pull synchronizes the local git code repository with the remote code repository, which can be understood as pulling down new commits from the remote website

Recently, I tried another website of the same type on github. I was worried that GitHub Desktop can only manage the code on the github website. It seems that it does not apply to other websites. I found SourceTree and found that SourceTree seems to be more powerful than GitHub Desktop. . The more obvious point is that in SourceTree, there is a Stage Hunk function, but GitHub Desktop does not. Stage Hunk means that for a file with multiple changes, SourceTree will split these changes into different code blocks and submit them separately-that is, multiple changes to the same file can be committed multiple times , And commit in file unit in GitHub Desktop, without subdivision. However, on the other hand, after all, GitHub Desktop relies on the most popular git website github, so the software interface is still quite simple and beautiful.

In general, SourceTree and GitHub Desktop are excellent git client software. Most importantly, git is a very good version control software system ^ _ ^

H-L
Published 8 original articles · Likes5 · Visits 40,000+

Guess you like

Origin blog.csdn.net/helenwei2017/article/details/102515502