git: change one line in file for the complete history

Here’s a command that will remove an offending line from a file’s history in all your branches: git filter-branch –tree-filter ‘sed -i “/sensitive information/ d” filename’ — –all This checks out every revision, runs the sed command on it, then commits that revision back. The sed command in this case matches any lines containing the … Read more