A developer accidentally commits a large binary file. What Git feature should they use to remove this file from history while retaining current changes?

  • rebase
  • reset
  • filter-branch
  • reflog
The correct option is filter-branch. This Git command allows the modification of the repository's commit history, including the removal of sensitive or large files. It's crucial to be cautious when using this command as it can rewrite history, impacting collaborators.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *