git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] reset.txt: update the title line to cover all use cases

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Apr 19, 2019, 09:30 UTC
Message-ID
<20190419093011.5753-1-pclouds@gmail.com>
git-reset could be used in three different ways:
- move HEAD to somewhere, optionally (not) update worktree/index
- "move" HEAD to HEAD, mainly to update worktree/index
- just update the index from some tree-ish

The second case is frankly a (neat) corner case of the first one. But it makes it impossible for me to summarize git-reset in one line. Without it at least I could write "reset HEAD or the index".

And even "reset all the things" is not correct because reseting worktree selectively is the job of git-checkout, not git-reset. Sigh.

This patch is not meant to be taken seriously. It's to raise the issue with git-reset documentation, and maybe someone could come up with a better summary line for git-reset. Because the current line only covers the first (original) case.

PS. We also need to update git-reset to mentino about its ability to
clear branch state.
---
 Documentation/git-reset.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index 26e746c53f..e12d8edee6 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -3,7 +3,7 @@ git-reset(1)
 
 NAME
 ----
-git-reset - Reset current HEAD to the specified state
+git-reset - Reset "something"
 
 SYNOPSIS
 --------
-- 
2.21.0.854.ge34a79f761
Next: Junio C Hamano
Message 1 of 2 in “reset.txt: update the title line to cover all use cases”
  1. reset.txt: update the title line to cover all use casesNguyễn Thái Ngọc Duy, Apr 19, 2019
  2. Junio C HamanoApr 21, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.