Skip to content

Print a list of git co-authors from the current repo's authors.

Notifications You must be signed in to change notification settings

spinningarrow/git-coauthors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

git-coauthors

Lists all authors of a git repo as potential co-authors of a commit.

Usage

git coauthors

Installation

Download the git-coauthors script to a directory in your PATH. I have ~/bin in my PATH and this is where I put it.

Integration

These are some of the ways git coauthors can be integrated in a workflow.

With grep and pbcopy

Quickly find a particular author and copy the Co-Authored-By line to the clipboard:

git coauthors | grep Authorname | pbcopy

With vim

Option 1: Using read

Paste the output of the above command directly in the buffer:

:read !git coauthors | grep Authorname

Option 2: Using vim-fzf to turn this into a completion:

This is my current workflow. I have an insert-mode keymap in my .vimrc:

inoremap <expr> <c-x><c-g> fzf#vim#complete('git coauthors')

When I'm writing a commit message, I type the partial name of the co-author and press Ctrl-xCtrl-g which pops up fzf with completions:

git coauthors as a completion with vim-fzf

Pressing Enter finishes the completion with the selected text.

More

There are probably more ways to integrate this. If you come up with another one, let me know!

About

Print a list of git co-authors from the current repo's authors.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages