List of my branches:

  • develop
  • features/magi
  • master

Current branch is features/magi.

I want to reset from current commit (commit 3) to previous commit (commit 1). So I use command:


But Magit offers me to reset to one of the branches. Why?

Here screenshot:


Magit guess

  • 1
    Magit is offering some likely completion candidates for resetting to, but you are free to enter any branch/commit ref you like here, such as @~2 (HEAD minus two commits).
    – Basil
    Oct 2, 2017 at 15:04
  • Note that Magit will automagitally offer any branch/commit ref under point as the default completion candidate.
    – Basil
    Oct 2, 2017 at 15:06
  • See also the Magit User Manual node on Resetting.
    – Basil
    Oct 2, 2017 at 15:08

1 Answer 1


magit-reset-soft does not offer the hashes of all commits as completion candidates because there could be thousands. It does however offer branches as candidates because there usually are only a few dozens at most. It also offers either the hash of the commit at point or some "description". In your case after you have moved point into the ac29adc * commit 1 line it would offer feature/magi~2 as the default completion candidate.

I recommend you also read about Completion and Confirmation in the Magit manual. (You might also want to read the other subnodes of Interface Concepts.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.