Little Git Tricks: Put a Commit Back to the Staging Area
Sooner or later we all run into this situation with Git: We committed a change that should not be committed and we only found that out after we hit commit in out IDE. If we did not yet push this change to our centralised repository, we can use this command to undo our mistake:
1 |
git reset --soft HEAD^ |
…