diff --git a/dim b/dim
index 74342f14b1e4833c3e816497d91b61819b897af8..bbe9308ac6952d88fc24bb8b89d2300549a6337a 100755
--- a/dim
+++ b/dim
@@ -802,7 +802,10 @@ function dim_rebuild_tip
 
 			# because we filter out fast-forward merges there will
 			# always be something to commit
-			git commit --no-edit --quiet --no-verify
+			if ! git commit --no-edit --quiet --no-verify ; then
+				echoerr "Commit failed, missing topic branch?"
+				return 1
+			fi
 			echo "Done."
 		fi