Fixes #3593 : No commit when restoring HEAD
Merge pull request #213 from VinceMacBuche/bug_3593/no_commit_when_restore_head

Fixes #3593 : No commit when restoring HEAD