Maybe add a way to detect if there are uncommited changes and abort it...