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

What is the diff between a --soft and a blank reset

From
ABA bughunter <a_bughunter@proton.me>
Date
Nov 17, 2024, 02:07 UTC
Message-ID
<myxdTw4K7jcrlKX-HC0edNKB3mgkjGJPAejkxWTcab03uT9uROZlO28zjhmnogOvGCJkag5q_Zvbok0VUyVjlkw5Goz3Gwe3l636lCYnGic=@proton.me>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
What is the diff between a --soft and a blank which is --mixed reset? Does this from --soft: "leaves all your changed files "Changes to be committed", as  git status would put it.'" mean soft leaves the adds indexed but before the adds were commit and without commit whereas --mixed would erase the index having adds ready to commit? This is how I gather it however the manpage hint's at being written by a thirdparty and having conflicting and scattered jargon makes it to where the user cannot communicate in a meaningful way about using the software. The difference here is touching the index but what does that mean in pragma: what does a git repo index handle? Isn't there some better way to find answers rather than Google advertisements or IRC wrong answers.  See the snippet from the manpage below:
git reset [<mode>] [<commit>]
           This form resets the current branch head to <commit> and possibly
           updates the index (resetting it to the tree of <commit>) and the
           working tree depending on <mode>. Before the operation, ORIG_HEAD
           is set to the tip of the current branch. If <mode> is omitted,
           defaults to --mixed. The <mode> must be one of the following:
           --soft
               Does not touch the index file or the working tree at all (but
               resets the head to <commit>, just like all modes do). This
               leaves all your changed files "Changes to be committed", as
               git status would put it.
           --mixed
               Resets the index but not the working tree (i.e., the changed
               files are preserved but not marked for commit) and reports
               what has not been updated. This is the default action.
               If -N is specified, removed paths are marked as intent-to-add
               (see git-add(1)).
from A_bughunter@proton.me
Sent with Proton Mail secure email.
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail

wnUEARYKACcFgmc5T+sJkKkWZTlQrvKZFiEEZlQIBcAycZ2lO9z2qRZlOVCu 8pkAAKvTAQCQIJGVcxvf7jSYvcPMUyeF15FriACM1QzPX2pyn++bxwEAxuK2 c5qmTxALcRE4OKHk8UkP2S0gHqnos75thGKMwAI= =Ilx7 -----END PGP SIGNATURE-----

Next: Chris Torek
Message 1 of 9 in “What is the diff between a --soft and a blank reset”
  1. A bughunterNov 17, 2024
  2. Chris TorekNov 17, 2024
  3. A bughunterNov 17, 2024
  4. Kristoffer HaugsbakkNov 17, 2024
  5. A bughunterNov 17, 2024
  6. Phillip WoodNov 17, 2024
  7. A bughunterNov 17, 2024
  8. Junio C HamanoNov 18, 2024
  9. A bughunterNov 18, 2024

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.