开发者

Removing files in GIT

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜