开发者

Removing files in GIT

开发者 https://www.devze.com 2023-01-04 19:13 出处:网络
How do I remove files in the r开发者_如何学编程emote repository?Remove file from repository and filesystem

How do I remove files in the r开发者_如何学编程emote repository?


Remove file from repository and filesystem

git rm my_path/my_file

Force removing file

git rm --force my_path/my_file

Remove file only from your repository not in your file system

git rm --cached my_path/my_file


I think you can try this git filter-branch command to rewrite remote origin branch. So that delete those files you wanna clean in all commits.

http://git-scm.com/docs/git-filter-branch

0

精彩评论

暂无评论...
验证码 换一张
取 消