Make a fix. Give him a message like "intermediate commit" or something else. Then cut the branch and start work from there. If you want to avoid the latest changes (i.e. those that you just made), cut the branch from HEAD^ and work from there.
If you are happy with the state of affairs after your experiment, you can move your master (or any branch you were in) to the current HEAD , thereby discarding the temporary commit. If you want an intermediate commit, go back to master , reset to HEAD^ , rework it, commit, and then merge the experimental branch into master .
If you do not like your experimental work, just omit this branch, return the master and reset to HEAD^ .
The entries are very lightweight and it is perfectly normal to use them that way.
source share