美文网首页HBuilderX简明uniapp教程
HBuilderX git插件使用说明

HBuilderX git插件使用说明

作者: 一直小鱼 | 来源:发表于2020-08-24 13:22 被阅读0次

easy-git, 是基于HBuilderX API开发的可视化图形Git插件,界面参考vscode源代码管理器。

安装

HBuilderX easy-git插件下载地址: https://ext.dcloud.net.cn/plugin?name=easy-git

Mac, 安装此插件可直接使用。

Windows需要电脑本机安装git-bashgit-bash下载地址

界面预览

插件预览.jpg

在项目管理器,选中Git项目,右键菜单,点击【easy-git】【源代码管理】即可打开git视图

image

Git仓库克隆

点击菜单【工具】【Git: 克隆仓库】,即可打开克隆界面

Git克隆.jpg

Git文件视图

  • 打开文件, 刷新当前项目
  • 文件暂存,暂存所有更改,撤销更改,取消暂存
  • commit
  • pull, push
  • push
  • 分支查看,分支切换, 打开log
image

分支管理

包含:分支切换, 分支创建并推送, 删除分支, 合并分支, 创建tag分支和tag搜索

点击本地分支名称,即可快速切换分支 。

image

查看log

  • 默认显示最近100条log, 如需查看更多数据,请使用-n
  • 支持搜索,多个搜索条件用逗号隔开
  • 搜索条件,即git log参数
搜索 说明 例子
--author 按作者搜索 --author='name'
--after; --since 搜索xx日期之后 --after='2020-7-1'
--before; --until 搜索xx日期之前 --before='2020-7-1'
-n 仅显示最近的 n 条提交 -n 10
--grep 用 --grep 选项搜索提交说明中的关键字 --grep xxxx
文件名称 按文件查看log, 直接输入文件名即可
-S 仅显示添加或删除内容匹配指定字符串的提交 -S xxxx
--committer 仅显示提交者匹配指定字符串的提交 --committer=xxxx

更多见:http://git-scm.com/docs/git-log

image

更多功能

image

快捷键

easy-git, 支持通过快捷键打开git视图。

点击菜单【工具】【自定义快捷键】,可自定义快捷键。

备注:目前只暴露了以下command。请逐条拷贝,设置快捷键时,请仔细检查。如需要更多commmand,请留言。


// 打开Git文件视图
{
    "key":"",
    "command": "EasyGit.main"
}
 
// 查看日志
{
    "key": "",
    "command": "EasyGit.log"
}

// Git克隆
{
    "key": "",
    "command": "EasyGit.clone"
}

// Git pull --rebase
{
    "key": "",
    "command": "EasyGit.pull"
}

// Git stash 储藏
{
    "key": "",
    "command": "EasyGit.stash"
}

// Git stash 储藏全部(包含未跟踪的)
{
    "key": "",
    "command": "EasyGit.stashAll"
}

// Git stash 弹出储藏
{
    "key": "",
    "command": "EasyGit.stashPop"
}

// Git stash 弹出最新储藏
{
    "key": "",
    "command": "EasyGit.stashPopNew"
}

// Git stash 删除所有储藏
{
    "key": "",
    "command": "EasyGit.stashClear"
}

设置

菜单【设置】【插件配置】【easy-git】功能

image

目前存在的问题

注意:

  • easy-git,webview引用了外部资源(bootstrap.cssvue.js),所以在没有网络的电脑上无法使用。
  • 已适配HBuilderX 绿柔主题、酷黑主题、雅蓝主题

相关文章

网友评论

    本文标题:HBuilderX git插件使用说明

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