Developed to make committing with emojis easy.
Interactive commit message builder. Based on standard of Jakub Profota. Documentation can be found here.
<action> <scope>: <message>
Actions are referenced to emojis, which have specific use. Currently supported actions are:
- Add (a) - ⭐ Add a new file
- Refactor (r) - ♻️ Refactor existing code
- Configure (c) - ⚙️ Configure a setting
- Remove (rm) - 🧪 Remove a file or setting
- Test (t) - 🚀 Add or update tests
- Optimize (o) - 📄 Optimize code
- Document (d) - 🪲 Add or update documentation
- Fix (f) - 🎨 Fix a bug
- Style (s) - 🎉 Update style
- Celebrate (cl) - 🎊 Celebrate a milestone
Scope is reference onto folder/file, which has been affected. Script does not write this for you, it's still your job.
This speaks for itself, you just write your message. (Capital letter at first position is not yet checked)
- Download
commit_builder.ps
. - In your PowerShell execute
.\commit_builder.ps1
. - Go through Action, Scope and Message.
- If you are not sure what action to choose/call, use
h
- If you are not sure what action to choose/call, use
- You have (hopefully) successfully committed.
- Optional: Move the file to desired location, for example:
Documents\WindowsPowerShell\Scripts
- Copy path to script.
- Search
Edit the system environment variables
- Open
Environment variables
- Select
Path
in user variables- Edit -> New -> Paste copied path to script
- Done. You can now call this from whenever
commit_builder.ps1
-
Download
commit_builder.sh
. -
Open your terminal and navigate to the directory where
commit_builder.sh
is downloaded. -
Give execute permission to the script by running
chmod +x commit_builder.sh
. -
In your terminal, execute the script by running
./commit_builder.sh
. -
Follow the prompts to go through Action, Scope, and Message.
- If you are not sure what action to choose, enter
h
for help.
- If you are not sure what action to choose, enter
-
If everything is correct, your changes will be successfully committed.
- Move the script to a desired location, for example:
~/scripts
. - Add the path to the script to your PATH variable:
- Open your
~/.bashrc
or~/.zshrc
file in a text editor. - Add the following line:
export PATH="$PATH:/path/to/your/script/folder"
. - Replace
/path/to/your/script/folder
with the actual path to your script.
- Open your
- Save the file and reload your shell configuration with
source ~/.bashrc
orsource ~/.zshrc
. - Now you can run
commit_builder.sh
from any directory in your terminal.
.\commit_builder.ps1 in PowerShell
./commit_builder.sh in Linux
> Enter Action (h for help): a
> Enter Scope: root
> Enter Message: Add commit to the script
> Commit? (⭐ root: Add commit to the script) (y/n): y
> [develop e997d79] ⭐ root: Add commit to the script