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


6.10 Resetting

Also see the git-reset(1) manpage.

x     (magit-reset)

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. With a prefix argument also reset the working tree.

X m     (magit-reset-head)

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 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 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.