diff --git a/app/views/edit_tree/show.html.haml b/app/views/edit_tree/show.html.haml
index 509205436ea37a4f8e6f8fe8185f2a77e9ca4f75..94a577d8e415a66a1003c5fbcc561b66221f4350 100644
--- a/app/views/edit_tree/show.html.haml
+++ b/app/views/edit_tree/show.html.haml
@@ -27,7 +27,7 @@
         .message
           to branch
           %strong= @ref
-      = link_to "Cancel", project_tree_path(@project, @id), class: "btn btn-cancel", confirm: "Are you sure?"
+      = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-cancel", confirm: "Are you sure?"
 
 :javascript
   ace.config.set("modePath", "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict")