diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb
index dc1571211063f253272bc3ceaa114a74acabedd1..a3731b45df0afaf06194239b05b5838e02c8c676 100644
--- a/app/controllers/concerns/creates_commit.rb
+++ b/app/controllers/concerns/creates_commit.rb
@@ -8,7 +8,8 @@ module CreatesCommit
       source_project: @project,
       source_branch: @ref,
       target_branch: @target_branch,
-      file_path: @path
+      file_path: @path,
+      previous_path: @previous_path
     )
 
     puts "#" * 10
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 75071c65efbda13f5810bc6a8c1bfbee03ea9667..37455e673282cd7d669e927bbe0eaffeefa5354c 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -749,15 +749,31 @@ class Repository
       options[:author] = committer
       options[:commit] = {
         message: message,
+<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945
         branch: ref
       }
 
+=======
+        branch: ref,
+      }
+
+      if previous_path
+        options[:file] = {
+          path: previous_path
+        }
+
+
+        Gitlab::Git::Blob.remove(raw_repository, options)
+      end
+
+>>>>>>> creates the update_file method in repository.rb and applies changes accordingly
       options[:file] = {
         content: content,
         path: path,
         update: update
       }
 
+<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945
       if previous_path
         options[:file].merge!(previous_path: previous_path)
 
diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb
index 0326a8823e975c20a7a02825ba1b1da94f27868f..29bd450bb98b8cee0ccb40783f210d3ef669b8ff 100644
--- a/app/services/files/base_service.rb
+++ b/app/services/files/base_service.rb
@@ -9,6 +9,7 @@ module Files
 
       @commit_message = params[:commit_message]
       @file_path      = params[:file_path]
+      @previous_path  = params[:previous_path]
       @file_content   = if params[:file_content_encoding] == 'base64'
                           Base64.decode64(params[:file_content])
                         else