Next: , Previous: , Up: Manipulating   [Contents][Index]


6.11 Resetting

Also see the git-reset(1) manpage.

x (magit-reset-quickly)

Reset the HEAD and index to some commit read from the user and defaulting to the commit at point, and possibly also reset the working tree. With a prefix argument reset the working tree otherwise don’t.

X m (magit-reset-mixed)

Reset the HEAD and index to some commit read from the user and defaulting to the commit at point. The working tree is kept as-is.

X s (magit-reset-soft)

Reset the HEAD to some commit read from the user and defaulting to the commit at point. The index and the working tree are kept as-is.

X h (magit-reset-hard)

Reset the HEAD, index, and working tree to some commit read from the user and defaulting to the commit at point.

X k (magit-reset-keep)

Reset the HEAD, index, and working tree to some commit read from the user and defaulting to the commit at point. Uncommitted changes are kept as-is.

X i (magit-reset-index)

Reset the index to some commit read from the user and defaulting to the commit at point. Keep the HEAD and working tree as-is, so if the commit refers to the HEAD, then this effectively unstages all changes.

X w (magit-reset-worktree)

Reset the working tree to some commit read from the user and defaulting to the commit at point. Keep the HEAD and index as-is.

X f (magit-file-checkout)

Update file in the working tree and index to the contents from a revision. Both the revision and file are read from the user.


Next: Stashing, Previous: Cherry Picking, Up: Manipulating   [Contents][Index]