代码GoogleCom导出Wiki,如何合并它? [英] codeGoogleCom exported Wiki, how to merge it?

查看:115
本文介绍了代码GoogleCom导出Wiki,如何合并它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

code.google.com 正在将所有项目导出到Github中......并且在导出时,生成一个名为<$ c

我的项目只有Wiki ...现在,在Github上,

p>

  https://github.com/MyUser/MyProject 

MyProject(从code.google导出)为空白(无源代码等),只有 README.md 。那么,如何将 wiki 分支合并到 master 如何做一个GitHub合并分支?





$ b 注意



借助这个答案,我们可以看到如何克隆 wiki 分支,

  git clone -b wiki stdGithubMyProjectURL 
cd MyProject
ls

(其中stdGithubMyProjectURL是MyProject的标准Github副本URL)

(在此上下文中的 ls 命令show only 分支 wiki 文件,不显示任何 master 文件)



所以,这个问题的一个变种是如何合并 wiki master from terminal?






see finishGoogleCodeGitHubWikiMigration ...但它非常复杂且隐晦...不要尝试使用。

解决方案


我的项目只有Wiki ...现在,在Github上,

您可以简单地将您的本地wiki分支作为您的GitHub仓库的主人

  git push --force  - u原创wiki:master 

不要忘记,每个GitHub仓库都有第二个wiki仓库,正如我在从GitHub wiki上轻松导出中所提到的那样(只需添加 .wiki 指向GitHub URL中的任何存储库名称)。
这意味着您也可以推送到您的(空)GitHub仓库的wiki部分。





独立于本地回购的wiki特性,如果您只想让您的分支在现有主Gi上 tHub回购,所有你需要做的是:

  cd / path / to / your / local / repo 
git远程设置网址来源https://< yourName> @ github.com /< yourname> /< yourrepo>
git fetch
git rebase origin master
git push -u origin master





假人完整程序



对于已经有wiki分支的回购商品(例如 ppKrauss / smallest-template-system ),您可以在主控制器上重播它,然后推送给主控制器:

  git clone https://github.com /ppKrauss/smallest-template-system.git 
cd最小模板系统
git checkout -b wiki起源/ wiki
#ls
git rebase master
# ls
git checkout master
git reset --hard wiki
git push

解释:第一次检查切换到 wiki 分支和一个 ls 只会显示分支文件。 rebase git命令在这里执行文件合并,第二个 ls 会显示 master 分支。

code.google.com is exporting all projects to Github... And when export, produce a separated branch named wiki for the Wiki of the project...

My project has only Wiki... Now, at Github,

https://github.com/MyUser/MyProject

the MyProject (exported from code.google) is "empty" (no source code, etc.), have only a README.md. So, how to merge the wiki branch to the master?

See also How to do a GitHub "merge branch"?


NOTE

With the help of this answer we can see how to clone the wiki branch,

   git clone -b wiki stdGithubMyProjectURL
   cd MyProject
   ls

(where stdGithubMyProjectURL is the standard Github copy-URL of MyProject)

(the ls command in this context show only the branch wiki files, not show any master file)

so, a variant of this question is how to merge wiki to master from terminal?


I see finishGoogleCodeGitHubWikiMigration ... but it is so complex and "obscure"... not try to use.

解决方案

My project has only Wiki... Now, at Github,

You could simply push your local wiki branch as the master of your GitHub repo

git push --force -u origin wiki:master

Don't forget though that each GitHub repo has a second "wiki" repo, as I mentioned in "Effortless export from GitHub wiki" (Just add ".wiki" to any repository name in the GitHub URL).
That means you could also push to the wiki part of your (empty) GitHub repo.


Independently of the "wiki" nature of the local repo, if you simply want to get your branch "on top" of the existing master GitHub repo, all you need to do is:

cd /path/to/your/local/repo
git remote set-url origin https://<yourName>@github.com/<yourname>/<yourrepo>
git fetch
git rebase origin master
git push -u origin master


complete procedure for dummies

For a repo which already has a wiki branch (like ppKrauss/smallest-template-system has), you can replay it on top of master and then push to master:

git clone https://github.com/ppKrauss/smallest-template-system.git
cd smallest-template-system
git checkout -b wiki origin/wiki
#ls
git rebase master
#ls 
git checkout master
git reset --hard wiki
git push

Explain: the first checkout switch to the wiki branch and an ls will show only the branch files. The rebase git command do the "merge of files" here, the second ls will show the README file of the master branch.

这篇关于代码GoogleCom导出Wiki,如何合并它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆