How to attribute a single commit to multiple developers?

后端 未结 9 1358
感情败类
感情败类 2020-12-02 06:50

The way all version control systems I\'m familiar with work is that each commit is attributed to a single developer. The rise of Agile Engineering, and specifically pair pro

相关标签:
9条回答
  • 2020-12-02 07:53

    A git convention is to use Co-Authored-By at the end of the commit message (git kernel: Commit Message Conventions, referring to Openstack Commit Messages). This is also one of the solutions on the git-core bug linked in Gerry's answer

    Co-authored-by: Some One <some.one@example.foo>
    

    In that comment on May 5, 2010, Josh Triplett also suggests implementing corresponding support in git.

    As Llopis pointed out in a comment, GitHub announced support for this on their blog on Jan 29, 2018: Commit together with co-authors (details).

    0 讨论(0)
  • 2020-12-02 07:53

    Most of the co-author tools do not support autocompletion. You can try git-coco, its written in python3 (I'm the developer). git-coco supports autocomplete and auto-suggest. Here is a snapshot autocomplete on sample authors

    0 讨论(0)
  • 2020-12-02 07:55

    git-pair

    https://github.com/pivotal/git_scripts#git-pair

    This simple script from Pivotal to automate Git pair programming attribution.

    You create a .pairs file like:

    # .pairs - configuration for 'git pair'
    pairs:
      # <initials>: <Firstname> <Lastname>[; <email-id>]
      eh: Edward Hieatt
      js: Josh Susser; jsusser
      sf: Serguei Filimonov; serguei
    email:
      prefix: pair
      domain: pivotallabs.com
      # no_solo_prefix: true
    #global: true
    

    and then:

    git pair sp js
    

    sets:

    user.name=Josh Susser & Sam Pierson
    user.email=pair+jsusser+sam@pivotallabs.com
    

    for you.

    0 讨论(0)
提交回复
热议问题