外观
get_remote_repo_default_branch
约 86 字小于 1 分钟
2025-08-01
@candriajs/git-neko-kit / get_remote_repo_default_branch
函数: get_remote_repo_default_branch()
get_remote_repo_default_branch(
remote_url
):Promise
<string
>
定义于: common/git.ts:239
获取远程仓库的默认分支
参数
remote_url
string
远程仓库URL
返回
Promise
<string
>
默认分支名称
示例
console.log(await get_remote_repo_default_branch('https://github.com/CandriaJS/git-neko-kit'))
-> 'main'