Wilson Mar bio photo

Wilson Mar

Hello!

Calendar YouTube Github

LinkedIn

so you can separate one commit from another, succinctly

US (English)   Norsk (Norwegian)   Español (Spanish)   Français (French)   Deutsch (German)   Italiano   Português   Estonian   اَلْعَرَبِيَّةُ (Egypt Arabic)   Napali   中文 (简体) Chinese (Simplified)   日本語 Japanese   한국어 Korean

US (English)   Norsk (Norwegian)   Español (Spanish)   Français (French)   Deutsch (German)   Italiano   Português   Estonian   اَلْعَرَبِيَّةُ (Egypt Arabic)   Napali   中文 (简体) Chinese (Simplified)   日本語 Japanese   한국어 Korean

Overview

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

NOTE: Content here are my personal opinions, and not intended to represent any employer (past or present). “PROTIP:” here highlight information I haven’t seen elsewhere on the internet because it is hard-won, little-know but significant facts based on my personal research and experience.

  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. Enterprise Software)

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

  12. Choices for DevOps Technologies
  13. Pulumi Infrastructure as Code (IaC)
  14. Java DevOps Workflow
  15. Okta for SSO & MFA

  16. AWS DevOps (CodeCommit, CodePipeline, CodeDeploy)
  17. AWS server deployment options
  18. AWS Load Balancers

  19. Cloud services comparisons (across vendors)
  20. Cloud regions (across vendors)
  21. AWS Virtual Private Cloud

  22. Azure Cloud Onramp (Subscriptions, Portal GUI, CLI)
  23. Azure Certifications
  24. Azure Cloud

  25. Azure Cloud Powershell
  26. Bash Windows using Microsoft’s WSL (Windows Subsystem for Linux)
  27. Azure KSQL (Kusto Query Language) for Azure Monitor, etc.

  28. Azure Networking
  29. Azure Storage
  30. Azure Compute
  31. Azure Monitoring

  32. Digital Ocean
  33. Cloud Foundry

  34. Packer automation to build Vagrant images
  35. Terraform multi-cloud provisioning automation
  36. Hashicorp Vault and Consul to generate and hold secrets

  37. Powershell Ecosystem
  38. Powershell on MacOS
  39. Powershell Desired System Configuration

  40. Jenkins Server Setup
  41. Jenkins Plug-ins
  42. Jenkins Freestyle jobs
  43. Jenkins2 Pipeline jobs using Groovy code in Jenkinsfile

  44. Docker (Glossary, Ecosystem, Certification)
  45. Make Makefile for Docker
  46. Docker Setup and run Bash shell script
  47. Bash coding
  48. Docker Setup
  49. Dockerize apps
  50. Docker Registry

  51. Maven on MacOSX

  52. Ansible
  53. Kubernetes Operators
  54. OPA (Open Policy Agent) in Rego language

  55. MySQL Setup

  56. Threat Modeling
  57. SonarQube & SonarSource static code scan

  58. API Management Microsoft
  59. API Management Amazon

  60. Scenarios for load
  61. Chaos Engineering