1

I see several operations such as log and diff with the magit-xxx-buffer-file syntax which operate on the active buffer.

I am looking for the command which would stage or commit the buffer I am editing.

Techniquab
  • 843
  • 7
  • 22

1 Answers1

4

M-x magit-stage-file is the command to stage the current buffer's file.

Or C-cM-g for magit-file-popup and then s

phils
  • 71,335
  • 11
  • 153
  • 198
  • Awesome, thank you! For those looking to stage only select hunks of a file: `C-c M-g` and `g` (for `status`). There, you can select individual hunks, and the current file is automatically selected. Thanks for the C-c M-g tip, @phils – hraban Apr 20 '21 at 13:34