Work with libgit2sharp to retrieve only the latest revision of a specific branch

半城伤御伤魂 提交于 2019-12-02 13:21:48

问题


Consider the following scenario: Some content (e.g. a web-site) is under git repository having several branches like master (for dev), qa and prod. A .net application (e.g. some cloud service) needs to have always the latest version of one specific branch (e.g. prod). There is no need to fetch full repository, only HEAD of this branch (git clone -b <branch> --depth=1 <remote_repo_url> --single-branch) and perform consequent updates.

How would you implement such scenario with libgit2sharp library?


回答1:


Cloning only a truncated portion of the history from a repository (ie. shallow cloning) is not supported by LibGit2Sharp yet.

You can subscribe to issue #229 to be notified of future progress.



来源:https://stackoverflow.com/questions/24037499/work-with-libgit2sharp-to-retrieve-only-the-latest-revision-of-a-specific-branch

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!