# README
git-co-authored-commit
This is the Golang version of my shell script fcm
The shell script version uses fzf to interactively select a co-author from a predefined list of co-authors and invoke git commit
with that co-author as co-authored-by trailer. This co-authored-by
trailer is useful in teams practicing pair programming.
The shell script above only works in zsh
and MacOS/Linux environment. This repository is an attempt to make a cross-platform version of that using Golang.
Installation
-
Download binary for your platform from Github releases
-
For MacOS/Linux,
chmod +x
and move file to a location in yourPATH
(optionally rename it to something shorter, e.g.gcam
)For Windows, add
.exe
extension to the file, optionally rename it to something shorter, add file location to yourPATH
variable -
Create
.git-co-authors
file at your home directory (for Windows, it's underC:/Users/your-user
) or in your.git
folder in your repository, each line is one co-author, .e.g.
author-1 <[email protected]>
author-2 <[email protected]>
Note
For Git Bash on Windows, you need to download Windows version of this tool and call this binary using winpty
:
winpty path/to/git-co-authored-commit {git-commit-message}
Limitation
It doesn't support multiple select like fzf
. I tried looking for a Golang TUI library that supports multi-select dropdown but haven't found any.