我的克隆cef存储库为:
def getRecomendationForUser (userId: Int) : scala.collection.mutable.Map[String,String] = {
val candidates = sc.parallelize(items.toSeq)
val recommendations = bestModel.get
.predict(candidates.map((userId, _)))
.collect()
.sortBy(- _.rating)
.take(10)
val tempIds = new ArrayBuffer[String]()
recommendations.foreach { r =>
tempIds += r.product.toString
}
return tempIds
}
var recomResults = scala.collection.mutable.Map[Int, scala.collection.mutable.Map[String,String]]()
for (item <- userNeedRec) {
val recForUser = getRecomendationForUser(item._1, item._2)
if(recForUser.size > 0)
{
recomResults += (item._1 -> recForUser)
}
}
它也有几个分支,可以通过运行
进行检查git clone https://bitbucket.org/chromiumembedded/cef.git
现在,我想通过将远程URL更改为以下方式将此仓库提交到我自己的git仓库中:
> git branch -a
* (HEAD detached at origin/3202)
master
remotes/origin/3202
remotes/origin/3239
但是我在仓库中只看到master分支。在下拉列表中看不到分支>git remote set-url origin git@github.com:g-jha/cef.git
>git remote -v
origin git@github.com:g-jha/cef.git (fetch)
origin git@github.com:g-jha/cef.git (push)
> git push -u origin master
> git push -u origin origin/3202
。
答案 0 :(得分:1)
以下链接对我有帮助: https://github.com/aiidateam/aiida_core/wiki/How-to-migrate-from-BitBucket-to-GitHub
我只需要克隆并使用--mirror
选项推送仓库。
>git clone --mirror https://bitbucket.org/chromiumembedded/cef.git
>cd cef.git
>git remote set-url --push origin git@github.com:g-jha/cef.git
>git remote -v
origin https://bitbucket.org/chromiumembedded/cef.git (fetch)
origin git@github.com:g-jha/cef.git (push)
>git push --mirror