diff --git a/cli/src/commands/git.rs b/cli/src/commands/git.rs index 9f22ca7c4b..78a39045d8 100644 --- a/cli/src/commands/git.rs +++ b/cli/src/commands/git.rs @@ -1015,7 +1015,7 @@ fn cmd_git_push( .map_err(|err| match err { GitPushError::InternalGitError(err) => map_git_error(err), GitPushError::NotFastForward => user_error_with_hint( - "The push conflicts with changes made on the remote (it is not fast-forwardable).", + err.to_string(), "Try fetching from the remote, then make the branch point to where you want it to be, \ and push again.", ), diff --git a/lib/src/git.rs b/lib/src/git.rs index 03df6cf200..b8847ca7ca 100644 --- a/lib/src/git.rs +++ b/lib/src/git.rs @@ -1208,7 +1208,7 @@ pub enum GitPushError { name = REMOTE_NAME_FOR_LOCAL_GIT_REPO )] RemoteReservedForLocalGitRepo, - #[error("Push is not fast-forwardable")] + #[error("The push conflicts with changes made on the remote (it is not fast-forwardable).")] NotFastForward, #[error("Remote rejected the update of some refs (do you have permission to push to {0:?}?)")] RefUpdateRejected(Vec),