Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • I always set the mark at the bottom of the region, and move point to the top in order to stage or unstage regions, as I've had issues (which I can't recall the specifics of) doing it the other way around in the past. YMMV. Commented Mar 1, 2012 at 20:57
  • 2
    Re: my previous comment, I recently read the reason for this, which is that when you un/stage the region, point must be within the region you are acting on. You can, of course, use C-x C-x to exchange point and mark if you had done it the other way around. Commented Apr 8, 2012 at 0:49
  • Does it behave differently when using transient-mark-mode? Because I always select top to bottom and never had a problem. Commented Apr 8, 2012 at 12:56
  • 3
    It wasn't enough for me to set the mark (C-SPC). I had to press C-SPC a second time to activate transient-mark-mode. Commented Nov 6, 2014 at 3:04
  • 1
    to be clear: magit will only commit whatever is selected. It doesn't matter how did you select e.g., I use Shift + <arrows> to select portion of a hunk and press s to stage the selected part. Commented Feb 15, 2015 at 23:02