Re: "git merge" merges too much!
From: Jeff King <hidden>
Date: 2016-06-15 22:47:49
On Mon, Nov 30, 2009 at 01:12:31PM -0500, Greg A. Woods wrote:
(From a first pass through the documentation I would never have guessed that "tags" were also a form of "refs". All these different names for
I find git is much simpler to use and understand if you start "at the bottom" with the basic concepts (because for the most part, git is really a set of tools for manipulating the few basic data structures). For a short intro, try: http://eagain.net/articles/git-for-computer-scientists/ I think Scott Chacon's "Pro Git" book also takes a similar approach, but I confess that I have not actually read it carefully. At this point, I know enough about git to make reading it not very interesting. :) You can find it online at: http://progit.org/book/
features. Even the gitglossary(7) is somewhat inconsistent on how it uses "ref" and "refs". Perhaps all that's needed is some firm editing and clean-up of the manuals and documentation by a good strong technical editor.)
I skimmed it and didn't see any inconsistency. If you have something specific in mind, please point it out so we can fix it.
"git rebase" will not work for me unless it grows a "copy" option , i.e. one which does not delete the original branch (i.e. avoids the "reset" phase of its operation). This option would likely only make sense when used with the "--onto" option, I would guess.
I think Dmitry already mentioned this, but you probably want to create a new branch to hold your rebased history if you don't want to modify the existing branch.
(git-log(1) is worse than ls(1) for having too many options, but worst of all in the release I'm still using it doesn't respond sensibly nor consistently with other commands when given the "-?" option.)
$ ls -?
ls: invalid option -- '?'
Try `ls --help' for more information.
$ ls --help ;# or ls -h
[copious usage information]
$ git log -?
fatal: unrecognized argument: -?
$ git log --help
[the man page]
$ git log -h
usage: git log [<options>] [<since>..<until>] [[--] <path>...]
or: git show [options] <object>...
$ cd /outside/of/git/repo
$ git log -?
fatal: Not a git repository (or any of the parent directories): .git
So "-?" is bogus for both ls and git. But there are two failings I see:
1. Outside of a repository, "git log" does not even get to the
argument-parsing phase to see that "-?" is bogus. We short-circuit
"-h" and "--help" to avoid actually looking for a git repository,
but obviously cannot do so for every "--bogus" argument we see.
We could potentially also short-circuit "-?" (and probably map it
to "-h" if we were going to do that). However, I didn't think "-?"
was in common use.
2. "git log -h" doesn't mention any of the options specifically,
though other git commands do (e.g., try "git archive -h"). This is
because the option list is generated by our parseopt library, but
the revision and diff options (which are the only ones that "git
log" takes) do not use parseopt. Maybe we should point to "--help"
for the full list in that case.
-Peff