       prevChangedFiles.push line.replace(/[ MADRCU?!](\s)(\s)*/, line[0])
   [message.join('\n'), prevChangedFiles]
 
-prepFile = (prevCommit, files, filePath) ->
+prepFile = (message, prevChangedFiles, status, filePath) ->
   git.cmd(['config', '--get', 'core.commentchar']).then (commentchar) ->
     commentchar = if commentchar.length > 0 then commentchar.trim() else '#'
-    prevStatus = files.trim().replace(/\n/g, "\n#{commentchar} ")
-    status = status.replace(/\n/g, "\n#{commentchar} ")
+    status = status
+    .replace(/\s*\(.*\)\n/g, "\n")
+    .replace(/\n/g, "\n#{commentchar} ")
+    .replace "committed:\n#{commentchar}", """committed:
+    #{
+      prevChangedFiles.map((f) -> "#{commentchar}   #{f}").join("\n")
+    }"""
     getTemplate().then (template) ->
       fs.writeFileSync filePath,
         """#{message}
         #{commentchar} Please enter the commit message for your changes. Lines starting
         #{commentchar} with '#{commentchar}' will be ignored, and an empty message aborts the commit.
-        #{commentchar}
-        #{commentchar} #{prevStatus}
-        #{commentchar}
-        #{commentchar} This is the current status to be committed
         #{commentchar}
         #{commentchar} #{status}"""
 

  mode: data[0]
  path: data.substring(1)

getStagedFiles = (repo) ->
  git.stagedFiles(repo).then (files) ->
    if files.length >= 1

    else
      Promise.reject "Nothing to commit."

getGitStatus = (repo) ->
  git.cmd ['status'], cwd: repo.getWorkingDirectory()

getTemplate = ->
  git.cmd(['config', '--get', 'commit.template']).then (filePath) ->
    if filePath
      fs.readFileSync(Path.get(filePath.trim())).toString().trim()
    else filePath

diffFiles = (previousFiles, currentFiles) ->
  previousFiles = previousFiles.map (p) -> prettyifyPreviousFile p
  currentPaths = currentFiles.map ({path}) -> path
  previousFiles.filter (p) -> p.path in currentPaths is false

parse = (prevCommit) ->
  lines = prevCommit.split(/\n/).filter (line) -> line isnt ''
