Try to revert to old state if any checkout fails.
Print a warning if checkout fails.
Function to resolve ref names in snapshot.
Allow resolving ref names when saving snapshot.