美文网首页
shell获取分支名的两个方式

shell获取分支名的两个方式

作者: ChoiKarl | 来源:发表于2020-11-26 22:33 被阅读0次

shell获取分支名的两个方式

now_branch_name=git symbolic-ref --short -q HEAD
echo "$now_branch_name"

now_branch_name=git rev-parse --abbrev-ref HEAD
echo "$now_branch_name"

相关文章

  • shell获取分支名的两个方式

    shell获取分支名的两个方式 now_branch_name=git symbolic-ref --short ...

  • 工程化常用git操作

    获取本地分支名

  • apk文件提取

    adb shell pm list packages 获取所有包名 adb shell pm path tv.da...

  • shell脚本

    交互式 Bash Shell 获取进程 pid 在已知进程名(name)的前提下,交互式 Shell 获取进程 p...

  • 关于“git pull”

    作用从远程库获取最新的更新,再与本地指定的分支自动merge。 完整格式git pull <远程库名><远程分支名...

  • 浏览文件夹对话框

    使用Shell对象的的方式获取选择的文件夹路径

  • 连接堡垒机所遇到的问题

    X-shell5的下载获取方式: 进入X-shell5的官网,点击download,点击Free License ...

  • adb命令大全

    获取应用包名和Actively:adb shell dumpsys window | findstr mCurre...

  • Shell:数组操作

    原文链接 数组定义 元素赋值 获取元素 获取数组长度 数组遍历 方式1 方式2 总结 Shell数组是用括号来表示...

  • APPium常用API

    APP内部页面跳转 获取当前类名的adb命令adb shell dumpsys activity | find "...

网友评论

      本文标题:shell获取分支名的两个方式

      本文链接:https://www.haomeiwen.com/subject/wnftwktx.html