Elegant Git is an assistant who carefully automates routine work with Git.
Main capabilities - unified local full-cycle work management for any git repository - local flexible continuous integration (aka workflows)
- actual work is allowed in custom branches only
- all pushes to
masterare strictly controlled
- all commands, which modify a state of Git, are printed
- declarative interaction matters
While developing something, it may be required to format code prior to committing changes or to open several URLs to report release notes after a new release. All these and similar actions, which you have to perform in addition to git actions, are your workflows. And Elegant Git allows automating them (it's like Git Hooks, but for Elegant Git commands).
There are personal and common actions. The personal actions are stored in
directory while the common actions are located in
.workflows/ directory within the repository.
That's why there is an ability to split what should be configured for any contributor and what's for
An action will be automatically triggered if an executable file is placed in a directory for either
personal or common actions. The executable file name has
<Git Elegant command>-<type> pattern
<Git Elegant command> is one of the commands and
<type> is either
(runs prior to the command) or
after (runs after to the command).
A sample workflow execution:
==>> git elegant save-work
# the command itself
❗Please take into that if an action returns a non-zero exit code, the execution of the workflow will be interrupted.
If you want to skip workflows for the current command execution, just use
git elegant --no-workflows save-work.
Support only one default remote -
Usually, Elegant Git translates exit codes of original Git commands. However, in some cases, it may face its own errors and raises them as
0- a successful execution
42- a philosophical constraint
43- a logical constraint
45- a required parameter is empty
46- an unknown command