committed

command module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 1 Imported by: 0

README

Committed

Committed is a WYSIWYG Git commit editor that helps improve the quality of your commits by showing you the layout in the same format as git log.

Features

  • Built-in multiline editor
  • Emoji selector
  • Author profile switching
  • Inline text interface
  • Subject line counter
  • Appends sign-off
  • Formats body width to 72 characters
  • Best practise recommendations

Compatibility

Terminals render emojis differently and this makes alignment of borders complicated and difficult. It is an ongoing process to improve the compatibility with terminals. The following list are the terminals that have been tested. Other terminals may display correctly and feedback would be appreciated to help update the list.

Terminal Status
macOS Terminal Compatible
iTerm2 Compatible
VS Code Compatible
Hyper Compatible
Alacritty Compatible
WezTerm Compatible
Kitty Border alignment issues

Installation

Install Committed with Homebrew.

brew install mikelorant/taps/committed

Views

Main

The main view when entering either the summary or body.

commit 1234567890abcdef1234567890abcdef1234567890
Author: John Doe <john.doe@example.com>
Date:   Mon Jan 2 15:04:05 2006 -0700

    ┌───┐ ┌──────────────────────────────────────────────────────────────┐
    │ X │ │ Capitalized, short (50 chars or less) summary                │ 47/50
    └───┘ └──────────────────────────────────────────────────────────────┘

    ┌──────────────────────────────────────────────────────────────────────────┐
    │ More detailed explanatory text, if necessary.  Wrap it to about 72       │
    │ characters or so.  In some contexts, the first line is treated as the    │
    │ subject of an email and the rest of the text as the body.  The blank     │
    │ line separating the summary from the body is critical (unless you omit   │
    │ the body entirely); tools like rebase can get confused if you run the    │
    │ two together.                                                            │
    │                                                                          │
    │ Write your commit message in the imperative: "Fix bug" and not "Fixed    │
    │ bug" or "Fixes bug."  This convention matches up with commit messages    │
    │ generated by commands like git merge and git revert.                     │
    │                                                                          │
    │ Further paragraphs come after blank lines.                               │
    │                                                                          │
    │ - Bullet points are okay, too                                            │
    │                                                                          │
    │ - Typically a hyphen or asterisk is used for the bullet, followed by a   │
    │   single space, with blank lines in between, but conventions vary here   │
    │                                                                          │
    │ - Use a hanging indent                                                   │
    └──────────────────────────────────────────────────────────────────────────┘

      Signed-off-by: John Doe <john.doe@example.com>

 Alt + <enter> Commit <s> Sign-off </> Help                Summary <tab>
Ctrl +     <c> Cancel                                       Author <tab> + Shift
Emoji

The emoji view reduces the position and lines of the body section to make space for a selector to appear. Filtering is available to narrow the choices down.

commit 1234567890abcdef1234567890abcdef1234567890
Author: John Doe <john.doe@example.com>
Date:   Mon Jan 2 15:04:05 2006 -0700

    ┌───┐ ┌──────────────────────────────────────────────────────────────┐
    │ X │ │ Capitalized, short (50 chars or less) summary                │ 47/50
    └───┘ └──────────────────────────────────────────────────────────────┘

    ┌──────────────────────────────────────────────────────────────────────────┐
    │? Choose an emoji: █                                                      │
    │> x - Improve structure / format of the code.                             │
    │  x - Improve performance.                                                │
    │  x - Remove code or files.                                               │
    │  x - Fix a bug.                                                          │
    │  x - Critical hotfix.                                                    │
    │  x - Introduce new features.                                             │
    │  x - Add or update documentation.                                        │
    │  x - Deploy stuff.                                                       │
    │  x - Add or update the UI and style files.                               │
    └──────────────────────────────────────────────────────────────────────────┘

    ┌──────────────────────────────────────────────────────────────────────────┐
    │ More detailed explanatory text, if necessary.  Wrap it to about 72       │
    │ characters or so.  In some contexts, the first line is treated as the    │
    │ subject of an email and the rest of the text as the body.  The blank     │
    │ line separating the summary from the body is critical (unless you omit   │
    │ the body entirely); tools like rebase can get confused if you run the    │
    │ two together.                                                            │
    └──────────────────────────────────────────────────────────────────────────┘

      Signed-off-by: John Doe <john.doe@example.com>

 Alt + <enter> Commit <s> Sign-off </> Help                Summary <tab>
Ctrl +     <c> Cancel                                       Author <tab> + Shift
Author

The author view moves the subject line down and reduces the height of the body section. This provides space for a selector to choose the commit author.

commit 1234567890abcdef1234567890abcdef1234567890
Author: John Doe <john.doe@example.com>
Date:   Mon Jan 2 15:04:05 2006 -0700

    ┌──────────────────────────────────────────────────────────────────────────┐
    │? Choose an author: █                                                     │
    │> John Doe <john.doe@example.com>                                         │
    │  John Doe <john.doe@example.org>                                         │
    │                                                                          │
    └──────────────────────────────────────────────────────────────────────────┘

    ┌───┐ ┌──────────────────────────────────────────────────────────────┐
    │ X │ │ Capitalized, short (50 chars or less) summary                │ 47/50
    └───┘ └──────────────────────────────────────────────────────────────┘

    ┌──────────────────────────────────────────────────────────────────────────┐
    │ More detailed explanatory text, if necessary.  Wrap it to about 72       │
    │ characters or so.  In some contexts, the first line is treated as the    │
    │ subject of an email and the rest of the text as the body.  The blank     │
    │ line separating the summary from the body is critical (unless you omit   │
    │ the body entirely); tools like rebase can get confused if you run the    │
    │ two together.                                                            │
    │                                                                          │
    │ Write your commit message in the imperative: "Fix bug" and not "Fixed    │
    │ bug" or "Fixes bug."  This convention matches up with commit messages    │
    │ generated by commands like git merge and git revert.                     │
    │                                                                          │
    │ Further paragraphs come after blank lines.                               │
    └──────────────────────────────────────────────────────────────────────────┘

      Signed-off-by: John Doe <john.doe@example.com>

 Alt + <enter> Commit <s> Sign-off </> Help                  Emoji <tab>
Ctrl +     <c> Cancel                                                    + Shift
Commit

Accepting the commit shows the output that will closely match the git log command.

commit 1234567890abcdef1234567890abcdef1234567890
Author: John Doe <john.doe@example.com>
Date:   Mon Jan 2 15:04:05 2006 -0700

     X Capitalized, short (50 chars or less) summary

     More detailed explanatory text, if necessary.  Wrap it to about 72
     characters or so.  In some contexts, the first line is treated as the
     subject of an email and the rest of the text as the body.  The blank
     line separating the summary from the body is critical (unless you omit
     the body entirely); tools like rebase can get confused if you run the
     two together.

     Write your commit message in the imperative: "Fix bug" and not "Fixed
     bug" or "Fixes bug."  This convention matches up with commit messages
     generated by commands like git merge and git revert.

     Further paragraphs come after blank lines.

     - Bullet points are okay, too

     - Typically a hyphen or asterisk is used for the bullet, followed by a
       single space, with blank lines in between, but conventions vary here

     - Use a hanging indent

     Signed-off-by: John Doe <john.doe@example.com>

[master 1234567] Capitalized, short (50 chars or less) summary
 3 files changed, 2 insertions(+), 1 deletions(-)

Shortcuts

Global

Command Key
Commit alt-enter
Toggle sign-off alt-s
Help alt-/
Focus author alt-1
Focus emoji alt-2
Focus summary alt-3
Focus body alt-4
Cancel control-c
Next component tab
Previous component shift-tab

Emoji

Command Key
Clear emoji delete
Reset filter escape
Next page page down
Previous page page up

Authors

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL