A sensitive file was accidentally committed to a GitHub repository. Which tools can be used to remove the file and its history from the repository? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: the git filter-branch command, BFG Repo-Cleaner.
Why this is the answer
The git filter-branch command is a powerful, but complex, Git command designed for rewriting history. It can be used to remove files from all commits, effectively purging them from the repository's history. BFG Repo-Cleaner is a faster, simpler alternative to git filter-branch specifically designed for removing large or sensitive data from Git repositories. Both tools rewrite the repository's history, which is necessary to truly remove a file and its presence from past commits. git rebase is used to combine or modify commits in a linear history but is not designed for removing specific files from all historical commits. While it can rewrite history, it's not the primary or most efficient tool for this specific task. GitHub Desktop is a GUI client for Git and does not offer the low-level history rewriting capabilities required to completely purge a file from the repository's history.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed