shell查询分支是否存在

shell git 查询分支是否存在

fun hasBranch(branch: String):Boolean {
      return !shell("git ls-remote --heads origin $branch",path).isNullOrEmpty()
}
posted @ 2023-04-27 01:08  c-若曦  阅读(55)  评论(0)    收藏  举报