Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Instagram Youtube

Github Stackoverflow Pinterest

so you can separate one commit from another, succinctly

Español (Spanish)   Français (French)   Deutsch (German)   Italiano   Português   Cyrillic Russian   中文 (简体) Chinese (Simplified)   日本語 Japanese   한국어 Korean

Overview

Here are suggestions to make Git commit messages more useful and convenient.

  1. The same message can be associated with all commits added before a commit. So before doing a git commit, check what changes have been added already:

    git status

    Modified: in the response identify items added for the next commit.

  2. Specify a commit message when you provide a command such as:

    git commit -m"#BUG342 NEW: initial commit README.md"

    REMEMBER: If you issue a “git commit” without the “-m” which provides the commit message, Git presents you a text editor window to type in a long message. (And if you see a “:” at the lower-right corner, type wq! to exit.)

    PROTIP: Specify an alias to type the minimal number of keystrokes, such as:

    gas "#BUG342 NEW: initial commit README.md"
  3. If you are using a planning system, type the identifier for it (such as “#BUG342”) in order to link code changes back to plans. Examples of planning systems:

    • Jira
    • https://github.com/marketplace/testquality

  4. Begin with a capital letter.

  5. Specify the status action in all capital (upper-case) letters, such as “NEW”, “REMOVE”, “RENAME”, “DOC”, “UPDATE”, “IMPROVE”, “FIX”, “RELEASE”.

    https://github.com/ahmadawais/Emoji-Log for examples.

  6. Use imperative present-tense action verbs like you’re giving an order: “add”, “create”, “update”, “revise”, “renumber”, “delete”, etc.

    PROTIP: Don’t use past-tense verbs or gerunds such as “added” or “updating”. This is because commits can be in several states over time.

  7. Alternatively, add emojis (listed below) to tag messages instead of typing a common purpose, intent, or other metadata about a commit. Emoji graphic icons can be recognized at a glance, no matter the spoken language.

    Insert Emojis icons are created by Git when it recognizes specific keywords between colons.

    PROTIP: Writing :shipit: in a message will cause :shipit: inserted and also triggers progression of the commit to the next stage in some CI/CD pipelines.

    Also, Emoji graphic icons take a single character in place of perhaps several words.

  8. Limit the message to 50 characters.

  9. Don’t end the line with a period. That’s unnecessary.

The above are based on: Angular Git commit message guidelines – well known and proven Git commit message convention which was introduced by the Angular project (A.K.A. Google).

Emojis

You don’t have to use them. Or you can use a small subset of them. But in case others use them, to help to find their meaning, I’ve listed all emojis below. These are from Carlos Cuesta’s visual page and CLI. I’ve classified them below in a more concise way:

Status / Warnings :

🎉 :tada: = Initial (NEW) commit.

🚧 :construction: = Work in progress.

🚑 :ambulance: = Critical hotfix.

✨ :sparkles: = Introducing new features.

🍻 :beers: = Writing code drunkenly.

💩 :hankey: = Writing bad code that needs to be improved.

🚨 :rotating_light: = Removing linter warnings.

⏪ :rewind: = Reverting changes.

⚗ :alembic: = Experimenting new things

🔒 :lock: = Fixing security issues.

⚡️ :zap: = Improving performance.

🚸 :children_crossing: = Improving user experience / usability.

🐛 :bug: = Fixing a bug.

Documentation:

📝 :memo: = Writing docs

💡 :bulb: = Documenting source code

🔍 :mag: = Improving SEO

👥 :busts_in_silhouette: = Adding contributor(s)

📖   :book: = Issue

Testing:

✅ :white_check_mark: = Updating tests.

👌 :ok_hand: = Updating code due to code review changes.

🤡 :clown_face: = Mocking things.

Dependency management:

💥 :boom: = Introducing breaking changes.

⬇️ :arrow_down: = Downgrading dependencies.

⬆️ :arrow_up: = Upgrading dependencies.

📌 :pushpin: = Pinning dependencies to specific versions.

➕:heavy_plus_sign: = Adding a dependency.

➖ :heavy_minus_sign: = Removing a dependency.

Coding Content:

🏗 :building_construction: = Making architectural changes.

🔥 :fire: = Removing code or files.

✏️ :pencil2: = Fixing typos.

🔊 :loud_sound: = Adding logs.

🔇 :mute: = Removing logs.

🎨 :art: = Improving structure / format of the code.

♻️ :recycle: = Refactoring code logic.

👷 :construction_worker: = Adding CI build system.

🚀 :rocket: = Deploying stuff.

🔖 :bookmark: = Releasing / Version tags.

💬 :speech_balloon: = Updating text and literals.

📈 :chart_with_upwards_trend: = Adding analytics or tracking code.

☸️ :wheel_of_dharma: = Work about Kubernetes

🌐 :globe_with_meridians: = Internationalization and localization.

🥚 :egg: = Adding an easter egg.

🏷️ :label: = Adding or updating types (Flow, TypeScript)

🗃 :card_file_box: = Performing database related changes.

♿️ :wheelchair: = Improving accessibility.

💄 :lipstick: = Updating the UI and style files.

Configuration / Metadata:

🐳 :whale: = Work about Docker.

💚 :green_heart: = Fixing CI Build.

🔧 :wrench: = Changing configuration files.

🔀 :twisted_rightwards_arrows: = Merging branches.

📦 :package: = Updating compiled files or packages.

👽 :alien: = Updating code due to external API changes.

🚚 :truck: = Moving or renaming files.

📄 :page_facing_up: = Adding or updating license.

🍱 :bento: = Adding or updating assets.

🙈 :see_no_evil: = Adding or updating a .gitignore file

📸 :camera_flash: = Adding or updating snapshots

📱 :iphone: = Working on responsive design.

Operating system specific:

🍏 :green_apple: = Fixing something on iOS.

🍎 :apple: = Fixing something on macOS.

🐧 :penguin: = Fixing something on Linux.

🏁 :checkered_flag: = Fixing something on Windows.

🤖 :robot: = Fixing something on Android.

The whole list of emojis are listed (without meanings) in this cheatsheet.

Emojis

This video shows how to using Visual Studio for Mac to create a ASP.NET Core Lazer pages web site that displays emojis retrieved using the GitHub API.

Automated compliance

https://opensource.com/article/19/2/emoji-log-git-commit-messages
Emoji Git commit message convention – I’m not kidding,

https://github.com/marketplace/todo is a GitHub app that creates new issues based on actionable comments in your code. It is built with Probot.

Resources

https://datree.io/blog/git-commit-message-conventions-for-readable-git-log/?source=dev.to

Datree Datree connects with GitHub pull requests to provide automatic policy compliance checks and insights for every code change. Create and enforce custom or built-in policies, in the context of your dev stack.

@datreeio datree.io

More on DevOps

This is one of a series on DevOps:

  1. DevOps_2.0
  2. ci-cd (Continuous Integration and Continuous Delivery)
  3. User Stories for DevOps

  4. Git and GitHub vs File Archival
  5. Git Commands and Statuses
  6. Git Commit, Tag, Push
  7. Git Utilities
  8. Data Security GitHub
  9. GitHub API
  10. TFS vs. GitHub

  11. Choices for DevOps Technologies
  12. Java DevOps Workflow
  13. AWS DevOps (CodeCommit, CodePipeline, CodeDeploy)
  14. AWS server deployment options

  15. Cloud services comparisons (across vendors)
  16. Cloud regions (across vendors)
  17. AWS Virtual Private Cloud

  18. Azure Cloud Onramp
  19. Azure Cloud
  20. Azure Cloud Powershell
  21. Bash Windows using Microsoft’s WSL (Windows Subystem for Linux)

  22. Digital Ocean
  23. Cloud Foundry

  24. Packer automation to build Vagrant images
  25. Terraform multi-cloud provisioning automation
  26. Hashicorp Vault and Consul to generate and hold secrets

  27. Powershell Ecosystem
  28. Powershell on MacOS
  29. Powershell Desired System Configuration

  30. Jenkins Server Setup
  31. Jenkins Plug-ins
  32. Jenkins Freestyle jobs
  33. Jenkins2 Pipeline jobs using Groovy code in Jenkinsfile

  34. Docker (Glossary, Ecosystem, Certification)
  35. Docker Setup
  36. Dockerize apps

  37. Maven on MacOSX

  38. Ansible

  39. MySQL Setup

  40. SonarQube static code scan

  41. API Management Microsoft
  42. API Management Amazon

  43. Scenarios for load