From: i o Date: Mon, 24 Apr 2023 11:41:47 GMT Subject: Proposal: adding --soft and --mixed options to git checkout Message-ID: I suggest adding `--soft` and `--mixed` options to `git checkout`, that act similarly to the corresponding options of `git reset`, i.e. `git checkout --soft ` should move the HEAD to without affecting the working tree or index, and `git checkout --mixed ` should move the HEAD to and update the index to match it without changing the working tree. The difference between this and `git reset` of course would be that, unlike the latter, this doesn't 'drag' the current branch along with HEAD; instead the usual behaviour would apply depending on what exactly is, i.e. `git checkout [--soft|--mixed] ` would detach HEAD and point it to , whereas `git checkout [--soft|--mixed] ` would move HEAD and switch from the current branch to . I'm aware work arounds exist for these, something like: ``` git checkout --detach git reset [--soft|--mixed] [|] git checkout [|] ``` so the aim here is really one of convenience by having this feature contained in a native option. Another option that might be worth adding to `git checkout` is `--keep-index` (like the option in `git stash`), to move the HEAD to and update the working tree to match it without changing the index.