Jun 15, 2012 · Run the following command, replacing PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA with the path to the file you want to remove, not just its filename. These arguments will: Force Git to process, but not check out, the entire history of every branch and tag; Remove the specified file, as well as any empty commits generated as a result