Remove Files completely from git repository along with its history

前端 未结 3 1283
天命终不由人
天命终不由人 2020-12-12 17:25

I have uploaded a font file that I don\'t have the rights to distribute to git hub several updates ago.

I have a relatively inactive repository and I have the ability

3条回答
  •  一整个雨季
    2020-12-12 17:52

    In that case you could to use Git Filter Branch command with --tree-filter option.

    syntax is git filter-branch --tree-filter ...

    git filter-branch --tree-filter 'rm -f Resources\Video\%font%.ttf' -- --all
    

    Explanation about the command:

    < command >: Specify any shell command.

    --tree-filter: Git will check each commit out into working directory, run your command, and re-commit.

    --all: Filter all commits in all branches.

    Note: Kindly check the path for your file as I'm not sure for the file path

    Hope this help you !!!

提交回复
热议问题