Resetting repo if merge or pop fails.