Skip to content

Awesome Android Studio Live Templates to decorate your git commit messages

License

Notifications You must be signed in to change notification settings

BirjuVachhani/gitmoji-android-live-templates

Repository files navigation

banner

GitMoji Android Live Templates

Do you know that you can use emojis in git commit messages? Many developers use emojis in the start of the commit message to make it more clear what the commit is about. It helps a lot when you're reviewing a PR or looking through commits to find something very specific.

Here's how it looks like:

gitmoji_gif

Your commit message when you write it:

:bug: fix some serious bug

Here's what it will look like on Github:

🐛 fix some serious bug

The prefix :bug: is converted to an emoji by Github automatically when you write it correctly. Awesome, isn't it?

Here's an awesome list of emojis and when to use them by Carlos Cuesta: Gitmoji

The Problem

This all looks awesome but when you will actually use it for every commit, you'll realise that it's a bit hard to remember them specially when the command is something like this: :twisted_rightwards_arrows:, Which eventually will be printed this: 🔀 It means: Merging branches.

Uff! so much to remember, isn't it? What if Android studio can help you remember it? what if you just write merge and android studio understands you what you're trying to do here and autocompletes it with :twisted_rightwards_arrows:? Wouldn't it be marvelous?

Well, Android Studio can do it if you can teach it how to do it!

Ah! If you're not up to teach Androd Studio how to do it(I knew that you're lazy when you skipped some reading earlier😴), keep reading further to find out how to easily do that!

The Solution

Android Studio provides a feature called Live Templates which lets us do what we want(Android Studio to work for us, again!). If you haven't heard of it, check this out.

I have created live templates for these emojis. It is very easy to remember them as all you have to do it figure out what you did in that commit. e.g you did some refactorization, write refactor and press TAB to auto complete it into right emoji. Simple, isn't it?

Here's how you can make use of these beautifully created live templates just for you!

How to use

  1. Download Gitmoji live templates from here.
  2. Open Android Studio and go to File > Import Settings.
  3. Select the downloaded zip file.
  4. In the Select components to import dialog, hit ok.
  5. Congrats! You've done it in first try!

To confirm that the live templates are imported successfully, go to

Available Gitmojis

No Abbreviation Actual Template Text Description Gitmoji
1 access :wheelchair: Improving accessibility.
2 addci :construction_worker: Adding CI build system. 👷
3 adddep :heavy_plus_sign: Adding a dependency.
4 analytics :chart_with_upwards_trend: Adding analytics or tracking code. 📈
5 arch :building_construction: Making architectural changes. 🏗️
6 assets :bento: Adding or updating assets. 🍱
7 bad :poop: Writing bad code that needs to be improved. 💩
8 breaking :boom: Introducing breaking changes. 💥
9 bug :bug: Fixing a bug. 🐛
10 ci :green_heart: Fixing CI Build. 💚
11 comment :bulb: Documenting source code. 💡
12 config :wrench: Changing configuration files. 🔧
13 db :card_file_box: Performing database related changes. 🗃️
14 degrade :arrow_down: Downgrading dependencies. ⬇️
15 deploy :rocket: Deploying stuff. 🚀
16 docs :pencil: Writing docs. 📝
17 exp :alembic: Experimenting new things ⚗️
18 feat :sparkles: Introducing new features.
19 gitignore :see_no_evil: Adding or updating a .gitignore file 🙈
20 hotfix :ambulance: Critical hotfix. 🚑
21 init :tada: Initial commit. 🎉
22 merge :twisted_rightwards_arrows: Merging branches. 🔀
23 move :truck: Moving or renaming files. 🚚
24 perf :zap: Improving performance.
25 refactor :recycle: Refactoring code. ♻️
26 release :bookmark: Releasing / Version tags. 🔖
27 remove :fire: Removing code or files. 🔥
28 rename :truck: Moving or renaming files. 🚚
29 responsive :iphone: Working on responsive design. 📱
30 revert :rewind: Reverting changes.
31 review :ok_hand: Updating code due to code review changes. 👌
32 rmdep :heavy_minus_sign: Removing a dependency.
33 rmlog :mute: Removing logs. 🔇
34 security :lock: Fixing security issues. 🔒
35 struct :art: Improving structure / format of the code. 🎨
36 test :white_check_mark: Updating tests.
37 text :speech_balloon: Updating text and literals. 💬
38 typo :pencil2: Fixing typos. ✏️
39 ui :lipstick: Updating the UI and style files. 💄
40 upgrade :arrow_up: Upgrading dependencies. ⬆️
41 ux :children_crossing: Improving user experience / usability. 🚸

Pull Request

To generate a pull request, please consider following Pull Request Template.

Issues

To submit an issue, please check the Issue Template.

Code of Conduct

Code of Conduct

Contribution

You are most welcome to contribute to this project!

Please have a look at Contributing Guidelines, before contributing and proposing a change.

License

Copyright © 2019 Birju Vachhani

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.