推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
Zeeland4v
V2EX  ›  Python

分享一个我花了两个小时写的 Git copilot(gcop),作为一个十分实用的工具,编写 git commit message 从未如此简单,欢迎大家体验使用

  •  1
     
  •   Zeeland4v ·
    Undertone0809 · Jun 24, 2024 · 7286 views
  •   You need to sign in to view this topic
    This topic created in 830 days ago, the information mentioned may be changed or developed.

    分享一个我花了两个小时写的 Git copilot(gcop),作为一个十分实用的工具,编写 git commit message 从未如此简单,欢迎大家体验使用。

    ref: https://x.com/kfhedRk3lXofRIB/status/1804907652876820798 Github: https://github.com/Undertone0809/gcop

    gcop 的开发灵感来自于一次偶然的推文分享 https://x.com/mtrainier2020/status/1802941902964277379 ,我突然想到可以借助 git alias 添加一些小命令,于是我花了两个小时的时间进行工程封装,并发布了 pypi 包 ,so not only a demo 。

    我的目的很简单,就是简化自己的 git commit 流程。所有额外的操作或输入自然语言的步骤都会降低开发体验。因此,在这个核心场景下,我希望有一个工具可以无缝地集成到我的 git 工作流中,自动生成提交消息。

    gcop 就是这样一个工具,它通过大语言模型的能力帮助我撰写 git commit 消息。只需要一个简单的命令 git gcommit ,就能生成符合规范的提交消息,如 feat: ...。

    在这个核心场景下,gcop 使用 git gcommit 命令直接无缝接入我的 git 工作流中,让我可以非常方便地自动 commit 。gcop 简单,且足够高效。

    gcop 集成了 promptulate 的能力,可以轻松集成市面上的所有模型,通过配置文件来驱动你的大模型,下面是 promptulate 的介绍。 https://x.com/tuturetom/status/1793656355385139556

    gcop 使用 p3g 脚手架生成,p3g 作为一个成熟的 Python 项目生成器,可以十分方便地帮助你创建标准化的 Python 工程化项目,下面是 p3g 的介绍。 https://x.com/kfhedRk3lXofRIB/status/1793701709946265853

    这个视频介绍了如何使用 gcop 。 https://www.youtube.com/watch?v=j7qKI_TdhXs

    欢迎大家体验使用,提供反馈~

    6 replies  •  2024-11-03 23:30:55 +08:00
    ZnductR0MjHvjRQ3
        1
    ZnductR0MjHvjRQ3  
       Jun 24, 2024
    其实对于我来说,可能我的开发流程并不规范,我每次提交的时候都会迷茫,我的 commit 应该怎么写?
    我有个毛病就是会写完几个功能后才想起来 commit 这中间如果有文件穿插或者二次修改 就很麻烦了 emm
    不知道大家都是怎么写的?
    Zeeland4v
        2
    Zeeland4v  
    OP
       Jun 25, 2024   ❤️ 1
    @Motorola3 不能再同意了,赞同你的观点,我也经常会有这种情况。比如我更新了一个大 features ,顺带包含了一些小的特性和 fix bug ,在这样子的情况下,我一般会先规划我大概要拆成哪几个 commit ,然后在穿插提交(文件穿插或者二次修改)问题还是会存在。
    datadump
        3
    datadump  
    PRO
       Jun 25, 2024
    命令行还是太麻烦了。期待有个图形界面版本
    unco020511
        4
    unco020511  
       Jun 25, 2024
    比较适合搞个 idea 插件,直接集成
    Zeeland4v
        5
    Zeeland4v  
    OP
       Jun 26, 2024
    大家平常都是 UI 界面交互 git 吗
    Zeeland4v
        6
    Zeeland4v  
    OP
       Nov 3, 2024
    http://gcop.zeeland.top/ gcop 持续更新,用 `git ac` 命令就可以自动生成 commit ,增加了很多好用的 git alias, 如 git info, git undo, git amend 等命令。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   978 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 17:53 · PVG 01:53 · LAX 10:53 · JFK 13:53
    ♥ Do have faith in what you're doing.