从CodePlex上的GIT仓库下载特定文件

时间:2023-02-04 01:19:57

I'm trying to implement a simple auto-update service for our WinForms application which is hosted in GIT on CodePlex. My auto-updater needs a json file which holds the latest version number and installer url. I've put this file on another webserver and my updated could easily read the file.

我正在尝试为我们的WinForms应用程序实现一个简单的自动更新服务,该应用程序在CodePlex上的GIT中托管。我的自动更新程序需要一个json文件,其中包含最新版本号和安装程序URL。我已将此文件放在另一个Web服务器上,我的更新可以轻松读取该文件。

To make our life not more complicated than necessary I want to save this file in GIT as well. Using the CodePlex browser the url is https://mapwindow5.codeplex.com/SourceControl/latest#src/SolutionItems/mw5-update.json

为了让我们的生活不再复杂,我想在GIT中保存这个文件。使用CodePlex浏览器,网址为https://mapwindow5.codeplex.com/SourceControl/latest#src/SolutionItems/mw5-update.json

I had hoped the url is something like https://git01.codeplex.com/mapwindow5/src/SolutionItems/mw5-update.json But it isn't ;(

我曾希望网址类似于https://git01.codeplex.com/mapwindow5/src/SolutionItems/mw5-update.json但它不是;(

Does anybody have experience with getting just 1 file from CodePlex GIT?

有没有人从CodePlex GIT获得一个文件的经验?

Thanks, Paul

1 个解决方案

#1


Try fetching then checking out just the file you need as described in this post:

尝试抓取然后检出您需要的文件,如本文所述:

git fetch
git checkout -m <revision> <yourfilepath>
git add <yourfilepath>
git commit

#1


Try fetching then checking out just the file you need as described in this post:

尝试抓取然后检出您需要的文件,如本文所述:

git fetch
git checkout -m <revision> <yourfilepath>
git add <yourfilepath>
git commit