<commit_before>module Bummr
  class Remover < Thor
    include Singleton
    include Log

    desc "remove_commit", "Remove a commit from the history"
    def remove_commit(sha)
      log "Bad commit: #{commit_message_for(sha)}, #{sha}".color(:red)
      log "Resetting..."
      system("git bisect reset")

      if yes? "Would you like to attempt to automatically remove this commit?"
        log "Removing commit..."
        if system("git rebase -p --onto #{sha}^ #{sha}")
          log "Successfully reverted bad commit...".color(:green)<commit_msg>Better rebase strategy for removing commits<commit_after>module Bummr
  class Remover < Thor
    include Singleton
    include Log

    desc "remove_commit", "Remove a commit from the history"
    def remove_commit(sha)
      log "Bad commit: #{commit_message_for(sha)}, #{sha}".color(:red)
      log "Resetting..."
      system("git bisect reset")

      if yes? "Would you like to attempt to automatically remove this commit?"
        log "Removing commit..."
        if system("git rebase -X theirs -p --onto #{sha}^ #{sha}")
          log "Successfully reverted bad commit...".color(:green)
{'fraction_non_alphanumeric': 0.11933797909407666, 'fraction_numerical': 0.0, 'mean_word_length': 2.9757785467128026, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4471265', 'n_tokens_mistral': 321, 'n_tokens_neox': 314, 'n_words': 118}