Skip to content

Latest commit

 

History

History
181 lines (118 loc) · 7.42 KB

README.md

File metadata and controls

181 lines (118 loc) · 7.42 KB

GCommit

GitHub Workflow Status GitHub release (latest by date) GitHub all releases GitHub contributors

GCommit - Group Commit

GCommit is a git-plugin that eases how to commit when you need to sign for more than one person -- pair and mob programming reality.

Instead of having to set manually the other developers names, you can define once in a configuration file, and simply reference it at any commit-time.

Installation

There are three methods for installing GCommit

Windows users, help us! Check this issue :)

1) AUR

GCommit is available at the Arch User Repository, so you can easily install via yay

yay -S gcommit-git

2) GitHub Releases

First, ensure you have libcrypt.so.1 available in your system.

Then head to releases page, download the latest g-commit-<OS>-latest.kexe¹ and store into a directory within your $PATH.

Make sure these three things:

  1. it is called git-gcommit
  2. it is placed within your $PATH
  3. it is executable

¹ if you're a linux user, the ubuntu build should work just fine

3) Manual build

If you're interested in building it manually,

# build the GCommit executable
./gradlew build

# copy to a directory within your PATH and name it "git-commit"
sudo cp build/bin/native/releaseExecutable/g-commit.kexe /usr/local/bin/git-commit

How to use

GCommit relies on a configuration file gcommit.conf.json. In it, there are two settings you define:

  1. the team

Each member of the team is defined by:

  • the name to be displayed
  • the email to be displayed
  • a tag to act as a reference

So, for instance, a team member can be defined in gcommit.conf.json as follows:

{
  "team": [
    {
      "name": "John Doe",
      "email": "[email protected]",
      "tag": "JOD"
    },
    {
      "name": "Jane Doe",
      "email": "[email protected]",
      "tag": "JAD"
    }
  ],
  
  // ... other aspects ...
  
}

GCommit makes it easier to sign commits by providing a quick reference to a stored team member. The tag is the "quick reference". So make sure to inform unique tags ;)

  1. the signature format

GCommit works for multiple Code Repository platforms, such as GitHub and GitLab -- so far, that's all GCommit supports.

Each platform has its own signature template to account activities for users, so you can configure which format to adopt.

Out-of-the-box, GCommit supports GitHub's Co-authored-by: Name <email> (default) and GitLab's Signed-off-by: Name <email>.

In the config file, you can choose which format to use:

{
  // ... other aspects ...

  "format": "GCommit/GitLab"
}

in case you wish to follow GitHub's format instead, use "GCommit/GitHub" or even don't define the format since it's the default

Place the gcommit.conf.json at the root of the project, and we recommend to add it to Git Ignore file.

Then, after adding changes to git staging area, simply run

git gcommit JOD JAD

in the case you want to sign with the entire team, you can simply run git gcommit with no arguments

In case there are no changes to commit the commit file won´t be opened and you will get the message:

gcommit: nothing to commit, working tree clean

check your directory and run again

Contributing

Please refer to CONTRIBUTING.md

Contributors

Many thanks to all contributors!

Mairielli
Mairieli Wessel

Emmanuel Arias
Emmanuel Arias

Gurkirpal Singh
Gurkirpal Singh

Eloy
Eloy

Thathiane
Thathiane Rosa

Vinay Hedge
Vinay Hegde

Andre Moukarzel
Andre Moukarzel

Caio Andrade
Caio Andrade

Pedro Pereira
Pedro Pereira

Jay Welborn
Jay Welborn

Leandro Rodrigues
Leandro Rodrigues

ParthPratim
Parth Pratim

JorossBarredo
Joross Joross

DorianD
Dorian D.

License

This project is licensed under the MIT License