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
A short answer in what context the 3 options are used:
To keep the current changes in the code but to rewrite the commit history:
soft
: You can commit everything at once and create a new commit with a new description (if you use torotise git or any most other GUIs, this is the one to use, as you can still tick which files you want in the commit and make multiple commits that way with different files. In Sourcetree all files would be staged for commit.)mixed
: You will have to add the individual files again to the index before you make commits (in Sourcetree all the changed files would be unstaged)To actually lose your changes in the code as well:
hard
: you don't just rewrite history but also lose all your changes up to the point you reset