rtyley / bfg-repo-cleaner

Removes large or troublesome blobs like git-filter-branch does, but faster. And written in Scala
https://rtyley.github.io/bfg-repo-cleaner/
GNU General Public License v3.0
11.04k stars 545 forks source link

GitHub action to detect 'dirty history'? #421

Open ghost opened 3 years ago

ghost commented 3 years ago

I'm considering using BFG to clean up a project, but I've no idea how to ask all other contributors to ditch their old copies of the repo... Instead, I was wondering if it'd be possible to detect any 'dirty history' in future PRs, maybe by way of a GitHub action...?

I'm really not very familiar with the inner works of Git, so I'm not even sure what to search for in the Actions marketplace to see if something like this exists, so I'd be interested to hear from others if there are any suggestions to make this process easier for all contributors.

klaernie commented 3 years ago

Maybe a small suggestion: write an action, that checks if the first dirty commit is reachable from the current revision. You might do this like that: https://stackoverflow.com/a/13526591