search

Home  >  Q&A  >  body text

git - How do I delete this file?

The situation is like this.
There is a large file of 140M. The upload limit of the local git server has been changed, so it can be uploaded.
When I upload it to a git server on the Internet, like git.oschina.net, the file size is limited, only 100M, so I cannot push it.
So I wanted to delete it, but it didn’t work.
Things tried:

git rm --cached filename 没用
直接删除 没用

Thank you very much.

迷茫迷茫2770 days ago583

reply all(3)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-02 09:36:44

    日经

    How can I delete a file from git repo?

    Remove a file from a Git repository without deleting it from the local filesystem

    git rm --cached not working

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-02 09:36:44

    Look at your instructions, do you only execute it locally git commit -m '大文件140M'这一步,然后想删除这个大文件。如果你直接执行git rm 大文件? If not, you can directly right-click the large file in your local warehouse and delete it. You can try it

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-02 09:36:44

    You can’t delete things in the remote warehouse directly. Delete the local ones first, commit them, and then push them to the remote warehouse

    git rm largefile
    git commit -m "delete large file"
    git push origin master

    reply
    0
  • Cancelreply