Git merge single file from another repository into my own

后端 未结 4 733
耶瑟儿~
耶瑟儿~ 2020-12-31 13:08

Say I have my own git repo with a bunch of text files in it. There is another different git repo that someone else owns with a bunch of text files that all differ from my ow

4条回答
  •  一整个雨季
    2020-12-31 13:56

    If you are using any kind of packaging (artifacts) results in the original repo, then you can ask the owner of the repo to publish the sources as well. Then in your own repo you consume and unpack such artifact and just copy the file you need. E.g. If using Java-Maven, make sure the build on the original repo publishes also the sources, then in your own repo, you put a pre-step (before compile) in which you download the sources dependency, unpack the jar file and copy the one you need to your proper directory. There are maven plugins for that

提交回复
热议问题