问题描述
我正在尝试通过想要动态创建分支的代码连接到我的git repo,使用nodegit来完成此任务,它会抛出错误,找不到文件或目录。
需要有关nodegit的以下任务的帮助:
1-通过传递我的凭据连接到git repo
2-创建一个分支并将其设置为上游
open.js
Git.Repository.open(path.resolve(__dirname,"https://gitw.dgital-1.com/digital//myproject"))
.then(function(repo) {
// Create a new branch on head
console.log("REPO",repo);
return repo.getHeadCommit()
.then(function(commit) {
return repo.createBranch(
"new-branch",commit,0);
});
});
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)