小编Evg*_*tov的帖子

使用SubGit将Git存储库转换为SVN

我正在使用SubGit同步Git和SVN repos.克隆远程Git仓库时,我想保留该仓库的所有历史记录.我目前遵循的步骤允许我仅复制主分支的历史记录:

svnadmin create svn_repos
subgit-1.0.0-EAP_1381/bin/subgit configure svn_repos
subgit-1.0.0-EAP_1381/bin/subgit install svn_repos
git clone svn_repos gitRepo

cd gitRepo/
git remote add -f newRemote git://127.0.0.1/gitRepo
...
From git://127.0.0.1/gitRepo
 * [new branch]      FirstProductionTag -> newRemote/FirstProductionTag
 * [new branch]      SecondProductionTag -> newRemote/SecondProductionTag
 * [new branch]      ThirdProductionTag -> newRemote/ThirdProductionTag
 * [new branch]      bugfix     -> newRemote/bugfix
 * [new branch]      bugfix2    -> newRemote/bugfix2
 * [new branch]      master     -> newRemote/master

git merge -s ours --no-commit newRemote/master
git read-tree --prefix=foo/bar/ -u newRemote/master 
git commit -m "Merged new …
Run Code Online (Sandbox Code Playgroud)

svn git subgit

7
推荐指数
1
解决办法
2969
查看次数

Github Java API - 搜索存储库

我想根据大小和关键字参数搜索 Github 存储库。这是我写的Java代码:

package searchTest;

import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.eclipse.egit.github.core.SearchRepository;
import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.service.RepositoryService;

public class GithubSearch {
    private static Map<String, String> searchQuery = new HashMap<String, String>();

    public static void main(String[] args) throws IOException {
        GitHubClient client = new GitHubClient();
        client.setCredentials("username", "password");
        RepositoryService service = new RepositoryService(client);
        searchQuery.put("keyword","microsoft"); 
        searchQuery.put("size","304");
        List<SearchRepository> searchRes = service.searchRepositories(searchQuery);
        System.out.println("Search result "+searchRes.toString());
    }   
}
Run Code Online (Sandbox Code Playgroud)

但我得到的输出是空的:

Search result []
Run Code Online (Sandbox Code Playgroud)

我检查了GitHub Java API javadoc,但找不到解决方案。

谢谢!

github-api

5
推荐指数
2
解决办法
5946
查看次数

标签 统计

git ×1

github-api ×1

subgit ×1

svn ×1