I\'m looking to split a commit up and not sure which reset option to use.
I was looking at the page In plain English, what does "git reset" do?, but I real
--soft
: Tells Git to reset HEAD to another commit, so index and the working directory will not be altered in any way. All of the files changed between the original HEAD and the commit will be staged.
--mixed
: Just like the soft, this will reset HEAD to another commit. It will also reset the index to match it while working directory will not be touched. All the changes will stay in the working directory and appear as modified, but not staged.
--hard
: This resets everything - it resets HEAD back to another commit, resets the index to match it, and resets the working directory to match it as well.
The main difference between --mixed
and --soft
is whether or not your index is also modified. Check more about this here.