Giter Club home page Giter Club logo

emojigit's Introduction

Gitmoji Commit

Stop wasting time looking up git commit message emojis. This extension helps you find the right emoji and helps compose your commit message, all without leaving VS Code. You can even supply your own custom emoji mapping to suit the needs of you and/or your team.

Content

Usage

Currently, Gitmoji Commit adds two commands to VS Code.

Create Commit Message

Automates creating a commit message by prompting user for the type of commit and commit message text. The type of commit selected determines the emoji. The emoji is inserted into the commit message as either unicode (e.g. ) or as GitHub emoji markdown colon syntax (e.g. :sparkles:).

When the time comes to type your commit message:

  1. Ctl + Shift + P (or Cmd + Shift + P on Mac) to open command prompt
  2. Locate Gitmoji Commit: Create Commit Message command and select
  3. Begin typing to filter commit types
  4. Select desired commit type via Click or Enter
  5. Type the text of your commit message into the input
  6. Press Enter
  7. Your commit message will appear in the integrated terminal (commit format - git commit -m ":<your emoji>: <your message>")
  8. Proceed with life
  • intended for use with integrated terminal

Cheat Sheet

Reference all Gitmojis including their emoji, colon syntax, and description.

  1. Ctl + Shift + P (or Cmd + Shift + P on Mac) to open command prompt
  2. Locate Gitmoji Commit: Open Cheat Sheet command and select
  3. Optionally, click an emoji or colon syntax to copy
  4. For reference purposes

Tips

Simplify usage of either command by mapping each one to a custom keyboard shortcut. For more information on keyboard shortcuts refer to the VS Code Documenation.

Breaking Changes

Version 2.0.0 changed a few items. Depending on your settings this may or may not impact your use of the extension. These changes were made to use better semantic naming for commands and options.

  1. Commands are now extension.gitmojiCommit and extension.gitmojiCheatSheet. If you had keyboard shortcuts to the previous extension.emojiCommit or extension.emojiCheatSheet you need to update those.

  2. The option for emoji syntax is now gitmoji.emojiSyntax. If you had this setting set to unicode you have to set this option again. If you use colon syntax there is no need to change as that is the default.

Configuration

Setting Options Default
Emoji Syntax colon - e.g. :tada: OR unicode - e.g. 🎉 colon
Auto Commit true - automatic commit OR false - commit sent to terminal for approval false
Auto Close true - closes terminal after commit OR false - terminal remains open after commit false
Multiline Commit true - forces shell to parse \n and create a newline false
Custom Emoji true - use custom emoji map OR false - use default gitmoji map false
Custom Emoji Map define an array of gitmoji objects { emoji: '✨', colon: ':sparkles:', text: 'Initial commit' } []

Emoji Syntax

Emoji Syntax determines the format of the emoji inserted into the commit message. The default colon syntax uses GitHub's emoji markdown to represent the emoji. A full list of emojis supported by GitHub can be found here. Changing this setting to unicode will insert the actual emoji into the commit message.

Auto Commit

Auto Commit determines the behavior of how the composed commit message is delivered to the integrated terminal. By default this setting is false. The commit message will be inserted into the terminal but will require the user to press enter to execute the command. If this setting is changed to true the command will be executed automatically. This can speed up the user's workflow, but use with caution.

Auto Close

Auto Close determines if the integrated terminal will close automatically after the commit command is executed. This setting if meant to work with Auto Commit set to true.

Multiline Commit

Multiline Commit forces a Bash shell to parse the \n character in the commit message. When Gitmoji Commit opens the prompt for commit message text a multiline commit message can be created. Requires Bash shell.

  • Example multiline commit message
🐛 Fix error when protocol is missing

First, it checks if the protocol is set. If not, it changes the url and
add the basic http protocol on the beginning.
Second, it does a "preflight" request and follows all redirects and
returns the last URL. The process then continues with this URL.

Resolves #17
  • Select 🐛 Fix a bug :bug: from the commit type prompt
  • Enter the following into the commit message prompt
Fix error when protocol is missing\n\nFirst, it checks if the protocol is set. If not, it changes the url and\nadd the basic http protocol on the beginning.\nSecond, it does a "preflight" request and follows all redirects and\nreturns the last URL. The process then continues with this URL.\n\nResolves #17

Custom Emoji

Custom Emoji determines if a custom emoji mapping should be used instead of the default Gitmoji Commit mapping. This custom mapping should be provided to the Custom Emoji Map setting.

Custom Emoji Map

Custom Emoji Map is an array of Gitmoji Commit objects that can be used instead of the defaults. This setting allows the user to define their own emojis and commit types to suit the needs of them and/or their team. The objects provided must be in the appropriate shape. Each object should has three required properies.

Property Description Example
emoji The unicode representation of the emoji
colon The GitHub markdown colon representation of the emoji :sparkles:
text The description of the type of commit associated with this emoji Initial commit

To use this custom mapping make sure to set Custom Emoji to true. Having this additional setting allows users to save a custom mapping in their options but also use the default mapping depending on the needs of their current project.

Changelog

Follow changes to this extension in the Changelog

Demo

  • Gitmoji Commit Message

  • Gitmoji Cheat Sheet

Other Info

Download Gitmoji Commit

Source Code

Inspired by Gitmoji

Contributors

benjaminadk darkhist AnandChowdhary

emojigit's People

Contributors

anandchowdhary avatar benjaminadk avatar

Stargazers

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

Watchers

 avatar  avatar

emojigit's Issues

Feature: Integrate into vscode.git

It would be nice if this extension would (additionally) integrate as an auto-complete like provider into the existing Git GUI of vscode.

So when I type : and press space bar it shows a selection of emojis.

Add possibility to use unicode emojis

In my projects, I'm directly using unicode emojis instead of their text code (e.g 📈 instead of :chart_with_upwards_trend :). This way the gitmoji only takes 1 character.

Feature request: be able to choose whether to use unicode or text.

Thanks for the extension which is a great start!

Feature request: Add space after Emoji

Hi, it's me again!
Do you think it would be possible to add a space by default between the emoji and the commit message?
That'd make more readable commits.
Thanks!

Add LICENSE

Hi,

I'd like to fork your repo and modify it to use it for my workflow. Since you have no LICENSE, I'm assuming this is not open-source? Can you clarify or possibly add LICENSE?

Thanks

Bug: Merging branches emoji incorrect

:twisted_rightwards_arrows: - 🔀
Is missing an ending "s" in the config. As seen below.
{ emoji: '🔀', colon: ':twisted_rightwards_arrow:', text: 'Merging branches' },

Unicode emoji is not inserted with PowerShell Core / Win10

Version: 1.39.0-insider (user setup)
Commit: 601e3e0762ac93e03cfef8336be8223bf32754e1
Date: 2019-09-30T07:41:01.671Z
Electron: 6.0.9
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18362

Using with PowerShell Core. Extension setting set to "gitmoji.emojiSyntax": "unicode".

I don't have a more specific repro 😕

Feature Request: configurable emoji setups

Greetings,

Would it be possible to add in configuration map for the emojis used? Not everyone is going to agree with the emojis that were chosen, and in my looking it doesn't appear that there is a way to alter the emojis without altering some of your code by hand (which is not the best of ideas).

I figure if the mapping of purpose-> emoji was a setting that could be extended or altered by the user then teams could create their own agreed-upon map and simply share it between them through their onboarding docs or what have you. I have some experience with doing this if you would like some help.

Adopt VS Code's 'asWebviewUri' API

Hi, I maintain VS Code's Webview API

Issue

Our telemetry suggests that your extension uses webviews and may be loading resources in these webviews using hardcoded vscode-resource: URIs. These URIs have some important limitations and don't work properly when VS Code is run in a browser. We are also making changes in the desktop version of VS Code that may cause these URIs to not work properly in future versions of VS Code.

While we are making our best effort to continue support existing webview extensions that use vscode-resource: URIs on desktop versions of VS Code, we will not able to fully support all uses cases.

Fix

To ensure that your extension continues to work in as many environments as possible—including on web and remotely—please:

These APIs shipped around 2 years ago so they should be available in all modern versions of VS Code. You can find additional information about the issue here: microsoft/vscode#97962

Let me know if you have any questions about this change

VSCode git implementation

I was going through your readme and noticed that you have plans to interact with vscode's git api. I have some experience working with it (I created a quick addon and didn't want to reinvent the wheel).

If you feel like you need some help, go ahead and ping me here.

If you already know what you're doing then no worries, but I figured I'd offer just in case you needed it.

Feature request: Commit in the background?

It would be awesome if there's a way Gitmoji Commit can make a commit in the background.

Current behavior:

  1. User selects "Gitmoji Commit: Create Commit Message"
  2. User selects emoji
  3. User enters commit message
  4. User presses the enter/return key
  5. Terminal with git command is opened
  6. User presses enter/return in the terminal
  7. User closes terminal

Proposed behavior:

  1. User selects "Gitmoji Commit: Create Commit Message"
  2. User selects emoji
  3. User enters commit message
  4. User presses the enter/return key

This can be achieved by maybe figuring a way out to either directly make git commits (does VS Code have an API for that) or perhaps opening the terminal, making the commit, and then closing the terminal automatically?

Update docs - future plans

Hi. I noticed the README has future plans in the toc but the section is deleted, so the link can be removed.

Also the future plans section is visible on the VSCode marketplace link so it looks like this project needs to be republished there to be up to date.

Feature request:

Hello it's me again and again!
Would it be possible to add the possibility to add comments to the commit?

From git commit documentation:

-m , --message=
Use the given as the commit message. If multiple -m options
are given, their values are concatenated as separate paragraphs.

This means that comments could be appended in the command line reusing -m "comment line 1" -m "comment line 2", etc

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.