質問

I see a lot of answers on the Web but this does not work for me. So, I do right click on the file and select “TortoiseGit”/”delete (keep local)”. The file icon becomes red and all above directories also.

If I clone this directory again I still check out this file

I tried to do “TortoiseGit”/”push” from the directory above. Options were default in push. TortoiseGit creates the dialog boxes for username and password. However, this does not change anything – still files are not removed from the repository

役に立ちましたか?

解決

After deleting the file from Tortoise git do a commit and then push it up to the repository, this will add the deletion to the remote repository and then any subsequent pulls will have have this commit and you will no longer be getting that file.

他のヒント

This applies if you want remove *.bad files from all versions /commits,

Basically you need force push and you msut have permission to do force push.Make sure to backup original bare repository before following action

Assume you want to remove *.bad files.

git filter-branch --index-filter "git rm --cached -f \
      --ignore-unmatch '*.bad'" --tag-name-filter cat -- --all

# ~~ compile / Test 

git push origin --force --all


ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top