How to “git show” on a remote repo?

后端 未结 2 2038
心在旅途
心在旅途 2021-01-03 08:49

I\'m trying to hook my git repository with Microsoft\'s Source Server feature such that people debugging into my binary will automatically pull source files down from github

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-03 09:05

    Unfortunately git does not support fetching individual remote files. There are three workarounds:

    • Use git fetch to get the remote history, then snatch the file from the local object store.
    • Use git archive to get a complete tree (e.g. git archive --remote=url master:somesubdir) in tar format on stdin.
    • Setup gitweb or something like that on the server and get the file through that.

提交回复
热议问题