Repack — Commit-editmsg

: Git populates the file with a list of staged files and instructions (prefixed with ) to help you write your message. The Completion

cat .git/COMMIT_EDITMSG

For example, if you want to write a script that automatically adds a ticket number from your branch name to the commit message, your script will read .git/COMMIT_EDITMSG , modify the text, and save it before Git finalizes the commit. COMMIT-EDITMSG

In the world of Git, much of the spotlight falls on commands like commit , push , merge , and rebase . Developers boast about their aliases, their branching strategies, and their elegant use of interactive rebasing. Yet, nestled quietly in the .git folder of every repository lies a humble, often-overlooked file: . : Git populates the file with a list

Several Git settings control how this file behaves: Developers boast about their aliases