Giter Club home page Giter Club logo

gcommit's Introduction

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

gcommit's People

Contributors

caiotda avatar doriancodes avatar eamanu avatar ehx avatar gpalsingh avatar hegde5 avatar iamjoross avatar jaywelborn avatar jooaodanieel avatar leandrigues avatar mairieli avatar parthpratim avatar pedro823 avatar thatiane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gcommit's Issues

Create a GitHub Release for Windows

GCommit has automatic releases with a GitHub Actions workflow.

But currently it only supports Linux and Mac releases -- see the workflow definition

In this issue, we're asking for contributions to
create an automatic release of GCommit for Windows via GitHub Actions

note: don't forget to update the README accordingly 🚀

--all flag to add everybody

Sometimes you need to add the entire team to a commit message (mob programming).

GCommit would benefit from a --all flag that does the job. A bonus would be -a alias.

Not windows friendly

Installation instructions for windows are missing.
Proposal: Use setup.py script to make cross platform installation easier.
Bonus: Easier versioning and distribution.

Make the contributors table as a 5 x n grid

It would be great to improve the space used by the contributors table by spreading it across each line.
My guess is that making a 5 column-wide is enough.

note: not sure if markdown will be the right tool, but always remember that HTML is also accepted

Prevent committing when no changes were added

GCommit creates a pre-written commit message for you with the signatures.

When there is no change added to commit, GCommit still opens the commit file. This behavior shouldn't happen.

In this issue, we're asking for contributions to
prevent GCommit from creating a commit message when there is no change added to commit

note: don't forget to update the README accordingly 🚀

Recursively search the config file

GCommit works based on a config file placed at the same folder where .git is.
Although, sometimes we're committing from a deeper directory.

In this issue, we're asking for contributions to
search the config file in the current directory and recursively in the parent

note: don't forget to update the README accordingly 🚀

Tests

The project could really use a set of automated tests.
This issue requests the installation of a tool for writting tests and some test code

New command `init`

It would be nice to have a git gcommit init command to scaffold an initial gcommit.conf.json with

{
  "team": [
    {
      "name": "",
      "email": "",
      "tag": ""
    }
  ],
  "format": "GCommit/GitHub"            // default, also accepts "GCommit/GitLab"
}

note: don't forget to update the README accordingly 🚀

Add support for named teams

Add support for team declaration on .gitteam file, so as to avoid naming every member initials in every git gcommit call.

Examples:

# at .gitteam file

JD="João Daniel <[email protected]>"
JOD="John Doe <[email protected]>"
JAD="Jane Doe <[email protected]>"

TEAM: JD JOD JAD
OTHER: JOD JAD

Then, on your shell:

git gcommit TEAM

Which should equivalent to:

git gcommit JD JOD JAD

Furthermore, it should also create the possibility to define multiple team combinations directly at .gitteam file.

As another suggestion, it could be implemented as a flag, such as git gcommit -t OTHER that is equivalent to git gcommit --team OTHER and git gcommit JOD JAD.

Fix pep8

It would be great fix some pep8 problems on the code.

Port .gitteam to a well-known format

GCommit would beneficiate from adopting a well-known format for its config file, such as JSON or YAML.
This would also create the opportunity to expand its configuration.

--except to easily add ALMOST everyone

Sometimes you need to add almost the entire team to a commit message (mob programming), in exception of one or two.

GCommit would benefit from a --except flag that receives a list of identifiers that will not be in the commit message. A bonus would be -e alias.

Update AUR release automatically

GCommit is available at the AUR for an easier installation for arch-linux-based OS.
But, the process of releasing is done manually.

In this issue, we're asking for contributions to
automate this process via GitHub Actions

note: don't forget to update the README accordingly 🚀

Not Python 2 friendly

When I try to execute using Python version 2.7, shows this error:
Traceback (most recent call last): File "/usr/local/bin/git-gcommit", line 100, in <module> main() File "/usr/local/bin/git-gcommit", line 95, in main except FileNotFoundError: NameError: global name 'FileNotFoundError' is not defined

Support for named teams

It would be nice to use pre-defined named teams that translate to a set of people.

For exemple, with this gcommit.conf.json

{
  "team": [
    {
      "name": "Alfred Billard",
      "email": "[email protected]",
      "tag": "AB"
    },
    {
      "name": "Chad Delligan",
      "email": "[email protected]",
      "tag": "CD"
    }
  ],
  "format": "GCommit/GitHub",
+ "namedTeams": {
+   "frontend": [ "AB", "CD" ]
+ }
}

when running the following

git gcommit frontend

would work as

git gcommit AB CD

generating


Co-authored-by: Alfred Billard <[email protected]>
Co-authored-by: Chad Delligan <[email protected]>

note: don't forget to update README accodingly 🚀

Add help option

Add a command that shows a help message about how to use GCommit

Turn GCommit into a commit wrapper

git gcommit is not a git commit wrapper, but it would be nice to have it as a full wrapper that only adds the team-signature behavior.

Suggestion: use a new flag that accept a list to differentiate from default git commit behavior, for example, add a git commit --team [ID1 ...]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.