Command
git filter-branchExplanation
git filter-branch is used to rewrite branches to filter out some files or modify commits. It rewrites the branches to filter out the files or modify the commits.
Examples
Remove file from history
git filter-branch --tree-filter "rm -f secret.txt"More
Switch Branches
git
Switch branches or restore files
Clone Repository
git
Clone an existing Git repository from a remote server to your local machine, creating a complete copy with full history
Check Repository Status
git
Display the current state of your working directory and staging area, showing which files are modified, staged, or untracked