10 reasons why I hate git)

Source: Internet
Author: User

Git is a source code version control system and is rapidly becoming the standard for open-source projects. It has a powerful distributed model that allows advanced users to use branches to handle various thorny problems and rewrite history records. However, to learn about git, you need to make more efforts. The unpleasant command line interface and git are so neglected by its users.

The following are 10 reasons why I hate git so much:

1. Complex Information Model

Git's information model is very complex, and you must understand them very well. In this regard, you can look at the Subversion: There are files, working directories, resource libraries, versions, branches, and labels. You need to understand these things. In fact, you already know about branches, labels, and files. But if you use git, you need to know more about the concepts: file, work tree, index, local resource library, remote resource library, remote, submit, treeishes, branch, and stash. You need to know more knowledge points than subversion.

2. Crazy command line syntax

The command line Syntax of git is completely random and inconsistent. For example, git pull is basically the same as git merge and git fetch. the merge of git branch and git checkout becomes git checkout-B, the different parameters of the GIT reset command do different things. After the file name is specified, the syntax of the command is completely different.

The most spectacular is the GIT am command. As far as I know, this is because Linus used different patch syntaxes to solve the problem of reading patches by email one night, especially on the mail title.

3. Poor and confusing documents

Speaking of the GIT document, the only thing I want to talk about is "operation ". They are writing documents for computer scientists, not for users. Here is an example:

Git-push-update remote refs along with associated objects

For users, it should be described:

Git-push-upload changes from your local repository into a remote Repository

Another example:

Git-rebase-forward-port local commits to the updated upstream head

Translation: Git-rebase-sequentially regenerate a series of commits so they can be applied directly to the head node

4. Information Model Diffusion

The GIT Information Model I mentioned at the first point is very complex, and it is still spreading like cancer cells. Of course, git is always used, new concepts such as refs, tags, The reflog, fast-forward commits, detached head state (!), Remote branches, tracking, and namespaces.

5. Full-blown Abstraction

Git contains too many non-Abstract abstractions, and there is often no difference between defining user interfaces and implementations. This is understandable. For an advanced user, he needs to understand the specific implementation of some functions, to understand the nuances of each command. However, a large number of internal details are a nightmare for beginners. There is a saying that for plumbing equipment and porcelain, you must be a plumber to know how the equipment is installed on porcelain.

Many people have responded to my complaint: You don't need to use all the commands. You can use git like subversion. This is a sophistry, just like telling a grandmother that the highway is not terrible. She can crawl 20 kilometers per hour in the fast lane on the left. Git does not provide any useful subsets. Each Command is associated with requirements for other commands. Simple actions often require complex actions to be undone or improved.

Below are some good suggestions from a GitHub project maintainer:

Search for the merged benchmark on the branch and master: 'git merge-Base Master yourbranch'

Assume that you have submitted a change record, from rebenchmarking your submission to merging accuracy, and then create a new branch.

Git rebase-onto head ~ 1 Head

Git checkout-B My-New-branch

Check out your ruggedisation branch and then remove the commit: 'git reset-hard head ~ 1 ′

Merge new branches to ruggedisation: 'git Merge My-New-branch'

Check out the master ('git checkout master'), merge the new branch ('git Merge My-New-branch'), and then check the merged status, then remove the Merge ('git reset-hard head ~ 1 ′).

Submit a new branch ('git push origin my-New-branch') and record the pull request

Grandma, it's easy to drive on the highway. Loosen the clutch, let the speed exceed 6000 turn to make the wheel slide, then enter the first bend and go to the highway, look at the road signs to the exit, use the handbrake drift to turn to the exit.

6. easy maintenance, but difficult to submit

A powerful aspect of git is the maintenance of the code reference library. You must merge the submissions from a large number of different sources, which is very suitable for large-scale parallel development. However, these are not designed for most git users. They only need to write code and may be on the same branch for several months, for them, git is a dual-pot coffee machine with four handles, but users just want to have coffee right away.

Interestingly, I don't think this is a balance between git's design. It completely ignores real user needs, obfuscation architectures, and interfaces. If you are an architect, git is great. But it is terrible for users. Many people are writing some simplified interfaces for git, such as easygit.

7. Insecure Version Control

As a version control system, it must promise that once the code is submitted to the system, I will ensure code security and you can retrieve any changes you make. Git, however, has many ways to completely crash the entire database and make it unrecoverable:

Git Add ./... /Git push-F origin master

Git push origin + master

Git rebase-I/git push

8. Assign the owner of the version control database to the contributor.

In traditional open-source projects, the maintainer only needs one person to handle branch and merge complex operations. Others only need simple update submission, update submission, and constant update submission. Now, git makes every user need to understand the various operations that need to be known as maintainers, Which is annoying. But what about maintainers? They have nothing to do. They have to raise their legs and drink coffee.

9. Git's history is a bunch of lies

The main output of development work is the source code. A well-maintained code history is very important to a product. There are a lot of arguments about rebenchmarking, most of them rely on aesthetic judgment on messy and unreadable days. Rebenchmarking provides developers with a "clean and tidy" but useless historical record. In fact, the correct solution is to better output logs and filter unwanted merging.

10. Simple tasks require many commands.

If you are developing an open-source project, you have made some changes and want to share it with others, you only need:

Modify code

Run SVN commit

If you add some new files:

Add File

SVN add

SVN commit

If your project is hosted on a GitHub website, you need:

Make some changes

Git add [not to be confused with SVN add]

Git commit

Git push

So far, your changes are only half done. Next you need to log on to GitHub, find your submission, and then release a "pull request" so that other people can get your changes.

In reality, the GitHub maintainers want your changes to be functional branches and they will require you to perform the following operations:

Git checkout master [to make sure each new feature starts from the baseline]

Git checkout-B newfeature

Make some changes

Git add [not to be confused with SVN add]

Git commit

Git push

Then log on to GitHub, switch to your new feature branch, and release "pull request"

To move your changes from your local directory to the actual project resource library, you need to: add, commit, push, "click pull request", pull, merge, and push.

The following is a flowchart to show you what a typical developer is doing on Subversion:

"Bread and butter" is a command and concept used to operate on remote SVN databases.

Then let's take a look at what will happen if your project is hosted on GitHub:

 

  • If git is powerful in branch and merge, its weakness is to make simple tasks very complex.

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: info-contact@alibabacloud.com 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.