Re: [PATCH v2] Group the default git help message by topic
- From
Wincent Colaiuta <win@wincent.com>
- Date
- Jun 11, 2010, 16:26 UTC
- Message-ID
- <422F3619-25EC-4509-8EE3-78B6C765AB2A@wincent.com>
- In-Reply-To
- <AANLkTiloErvcWS1hW80cIV9SiWu_7CBdNSx_iAppcGOd@mail.gmail.com>
El 11/06/2010, a las 18:03, Scott Chacon escribió:
Show 29 quoted lines
> + puts("The most commonly used git commands are:\n");
> +
> + puts("Basic Commands:");
> + print_command("init");
> + print_command("clone");
> + print_command("add");
> + print_command("status");
> + print_command("commit");
> + puts("");
> +
> + puts("Branch Commands:");
> + print_command("branch");
> + print_command("checkout");
> + print_command("merge");
> + print_command("tag");
> + puts("");
> +
> + puts("History Commands:");
> + print_command("log");
> + print_command("diff");
> + print_command("reset");
> + print_command("show");
> + puts("");
> +
> + puts("Remote Commands:");
> + print_command("remote");
> + print_command("fetch");
> + print_command("pull");
> + print_command("push");Nice. I'm sure the output will be a bit less intimidating, but I am not sure about some of the grouping choices you've made here.
"git checkout" is almost certainly a "Basic" command, even though it's used for creating and switching branches.
"git tag" doesn't really seem to be a "Branch" command, as it's for tagging objects (usually commits), and not branches.
"git reset" is the odd one out in the "History" commands group. The other three commands are about _inspecting_ history, whereas "git reset" is about changing the current HEAD. I actually think "git reset" fits better with the "Branch" commands.
I think I'd be inclined to use more descriptive headings and group the commands like this:
Basic operation:
init
add
status
commit
checkout Inspecting repository state and history:
log
diff
show Working with branches:
branch
merge
reset Interacting with other repositories:
clone
fetch
pull
push
remote...</end of my 2 cents>
Cheers, Wincent