5 ms·
Short of me downing distressing amounts of coffee, could someone explain these please for those of us still trying to grok git?
by ctdonath 14y ago
Short of me downing distressing amounts of coffee, could someone explain these please for those of us still trying to grok git?
- vampirechicken 14y agoGit is a journey, not a destination.
- pipboy3 14y agoit's a satire
- 0x0 14y agoIt's a list of pitfalls which are all too easy to fall into. The somewhat inconsistent command line interface / option / argument parsing in git can sometimes lead to very unexpected results.
- austintaylor 14y agoI'm not sure what Silence is about. My git-config-fu fails me. One Thing Well demonstrates how one command (git checkout), while it does do 'one thing well' (changing your working directory to match something in the index), can handle a wide variety of seemingly unrelated use cases. Only the Gods demonstrates how history can mean different things: commit parentage, which is usually immutable, and branch history, which is ephemeral. The Hobgoblin probably refers to the Emerson quote "A foolish consistency is the hobgoblin of little minds." The Long and the Short of It is about how git accepts `git --help command`, `git command --help`, and `git command -h` but `git -h command` returns an argument error. A theme here is that git does not try to anticipate your workflow. Its commands and options are named based on what they do, rather than how you should probably use them. This makes git a very powerful tool, but with an interface that is often counter-intuitive.
- kzrdude 14y agoEach git command is a designed tool itself. Others expect it to be 'git' to be the wholly designed tool as one unit, but it's a toolbox.
- lelandbatey 14y agoJust to explain "Silence": Apparently, git does not allow you to alias default git commands (like "pull", "push", "commit", etc) to something else. In the given situation, a user is trying to alias the default "pull" command to "pull --ff-only" so that pull will not automatically merge changes and will only fast-forward. However, since git does not allow you to alias default commands, when the Git Master runs "git pull" it ignores the alias entirely and does a normal pull, and in so doing merges changes. The student is confused, but eventually figures it out.
- pilgrim689 14y ago> pull = pull --ff-only From "git --help config": "To avoid confusion and troubles with script usage, aliases that hide existing git commands are ignored." > “Use git checkout.” This is just a jab at how "checkout" does too many different things. > “I have a historical record of a merge commit with two parents. How can I find out which branch each parent was originally made on?” Git doesn't let you do this. > “Surely some of these could be made more consistent, so as to be easier to remember in the heat of coding?” Git commands can be inconsistent. > “git -h branch“. This command tells you nothing about "branch" (throws error), whereas "git --help branch" launches the browser at git-branch's manpage. This goes against what people usually expect (that "-h" is just shorthand for "--help".
- kzrdude 14y agoBut you should recommend 'git help', i.e. the help subcommand, since that's what git refers to on its own.
- herdrick 14y agoHe's criticizing git.