Git开源工具PHP-GitScraper、Octohat、node-gitm介绍
以下为你介绍的Git开源工具都可用在Linux系统上:PHP-GitScraper(Git 仓库下载工具)、Octohat(GitHub 查找无代码贡献用户)、node-gitm(Git 多仓库管理工具)。
1、PHP-GitScraper(Git 仓库下载工具)
GitScraper 通过 HTTP 从公开可访问的 ".git" 文件夹下载整个 Git 仓库。
要求:
PHP 5.5.0以上。
安装:
通过Composer [?]包含库:
$ composer require delight-im/git-scraper
包括Composer自动加载器:
require __DIR__ . '/vendor/autoload.php';
使用:
require __DIR__.'/src/GitScraper.php';
$scraper = new Delight\Git\GitScraper('http://www.example.com/.git/');
$scraper->fetch();
// var_dump($scraper->getFiles());
$scraper->download('./');
下载地址:https://github.com/delight-im/PHP-GitScraper
2、Octohat(GitHub 查找无代码贡献用户)
要发现GitHub 上的 code contributions 很很容易,但其它的呢?Octohat 可以查出 GitHub 项目上无代码贡献的用户。
Octohat 中输入一个 github repo 名字,它会回复一串和 GitHub 项目有互动,但又没有提交代码的 GitHub 用户。交互包括:
在一个 issue 上 raising 或者 commenting。
在一个 pull request 上 raising 或者 commenting。
对一个 commit 进行 commenting。
使用示例:
octohat [-h] [-g] [-l LIMIT] repo_name
positional arguments:
repo_name githubuser/repo
optional arguments:
-g, --generate-html Generate output as HTML
-l LIMIT, --limit LIMIT Limit to the last x Issues/Pull Requests
下载地址:https://github.com/LABHR/octohatrack
3、node-gitm(Git 多仓库管理工具)
Gitm,一个简单好用的 git 多仓库管理工具。类似 Git Submodule 和 repo 的小工具。
应用场景一:
应用场景二:
示例代码如下图所示:
系统要求:
Node.js v0.12.0+
安装:
运行以下命令安装,前提是系统支持npm命令方式:
npm install gitm -g
gitm克隆:
gitm clone
阅读当前目录中的文件repo.gitm,并克隆每个git存储库。
如果属性分支存在,则每个分支都会被检出。fisrt分支将是默认分支。
gitm clone https://raw.githubusercontent.com/snowdream/gitm/master/examples/repository/repo.gitm
从URL读取文件repo.gitm,其他操作与命令gitm clone相同。
下载地址:https://github.com/snowdream/node-gitm
注明
以上就是Git开源工具PHP-GitScraper、Octohat、node-gitm的介绍内容,这些Git开源工具都能使用在Linux操作系统中。