Next: Committing, Previous: Staging and Unstaging, Up: Manipulating [Contents][Index]
Magit provides several "apply variants": stage, unstage, discard,
reverse, and "regular apply". At least when operating on a hunk they
are all implemented using git apply
, which is why they are called
"apply variants".
The previous section described the staging and unstaging commands. What follows are the commands which implement the remaining apply variants.
magit-apply
) ¶Apply the change at point to the working tree.
With a prefix argument fallback to a 3-way merge. Doing so causes the change to be applied to the index as well.
magit-discard
) ¶Remove the change at point from the working tree.
On a hunk or file with unresolved conflicts prompt which side to keep (while discarding the other). If point is within the text of a side, then keep that side without prompting.
magit-reverse
) ¶Reverse the change at point in the working tree.
With a prefix argument fallback to a 3-way merge. Doing so causes the change to be applied to the index as well.
With a prefix argument all apply variants attempt a 3-way merge when
appropriate (i.e., when git apply
is used internally).
Next: Committing, Previous: Staging and Unstaging, Up: Manipulating [Contents][Index]