pigit 快速使用 git

相信对于每一个开发人员来时,git 绝对不会陌生。Git是一个免费的、开源的分布式版本控制系统,旨在以快速高效的方式处理从小型到大型的项目。

当我们在使用 git status git branch 这些命令操作 git 时,有没有觉得不够快。这个是否我么可以借助一些第三方的工具来帮助我们快速、方便的使用 git。

Git 的图形化工具不少,我作为一个 terminal 爱好者,在这里向大家介绍一款自己开发的 terminal 下的 git 辅助工具 – PIGIT

该工具选择使用 python 开发的原因是因为大部分的类uinx系统都有预装 python,python 环境本身的安装也十分简单。

项目地址: https://github.com/zlj-zz/pigit

pigit 是一款基于 Python 编写的 git 辅助工具。可以通过 pip 快速的安装它:

pip install pigit -U

当我们安装完后,在 terminal 中输入 pigit 就可以开始使用它。

pigit 预先定义的大量的 git 操作,我们可以直接使用 pigit 提供的短命令触发该操作。 你可使用 pigit -s 来查看它提供了哪些预定义命令:

These are short commands that can replace git operations:
    b        lists, creates, renames, and deletes branches.
             git branch
    bc       creates a new branch.
             git checkout -b
    bl       lists branches and their commits.
             git branch -vv
    bL       lists local and remote branches and their commits.
             git branch --all -vv
    bs       lists branches and their commits with ancestry graphs.
             git show-branch
    bS       lists local and remote branches and their commits with ancestry graphs.
             git show-branch --all
    bm       renames a branch.
             git branch --move
    bM       renames a branch even if the new branch name already exists.
             git branch --move --force
    bd       delete a local branch by name.
             git branch -d
    c        records changes to the repository.
             git commit --verbose
......

pigit 还提供了一个简单的命令行交互,来快速操作 git 的工作树,避免 git add file1 file2 ... 这样的操作。

gif demo
除此之外, pigit 还提供了一些与项目有关的功能。 如:代码统计、创建 .gitignore 模版、查看项目信息…

gif demo
更多的用法可以到项目的 github 中查看。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值