How do I add file to remote Git repo (Github) without cloning the whole repo first

后端 未结 3 1039
难免孤独
难免孤独 2020-12-15 05:25

This Git question is very similar to another one about SVN.

I have a repo full of big files and I need to add a single file to it. This used to be very easy in SVN.<

3条回答
  •  有刺的猬
    2020-12-15 05:35

    The repo includes a collection of rather fatty binary files

    That is not what a git repo is designed to do, as I explained here.

    You can't push something without having fetched first, so unless your repo is hosted in a service which supports adding files through its web interface (like GitHub, as commented by heinrich5991), you won't be able to import just one file.

    One alternative would be to have a dedicated server hosting a full copy of your repo at all time, to which you could add one file, and from which you could then push to the target repo.

提交回复
热议问题