Skip to content

Latest commit

History

History
56 lines (41 loc) 路 2.2 KB

README.adoc

File metadata and controls

56 lines (41 loc) 路 2.2 KB

gitconfig

馃摑 Some common git configs / hooks / templates that I use

Global config

The .gitconfig file is intended to be (at least part of) a user鈥檚 global ~/.gitconfig.

Commit message template

The .git-commit-template is also expected to live in the user鈥檚 home directory. If you wish to change its name or location on your own system, you鈥檒l just need to update the commit.template property in the global template. In essence, here.

The main purpose of the commit message template is to make it easier for me to use gitmoji with my current tooling, rather than installing gitmoji-cli (which is also cool if you want to use that).

When I鈥檓 committing with magit (emacs 馃挅), and I鈥檓 presented with the template, I鈥檒l just uncomment the most relevant emoji summary line, and modify the message to be specific to my commit. I imagine it should work similarly with whatever tools you use.

prepare-commit-msg hook

The prepare-commit-msg hook should be symlinked/copied into the .git/hooks directory within each repo that you intend to use it for.

There are a couple of things that it does currently:

  1. If it鈥檚 a merge commit, it will prefix the summary line with 馃攢, because emoji are the future, and this is the one that gitmoji prescribes for merging branches. 馃槑

  2. If GitPython is installed, and the current branch name starts with either RHMAP- or FH-, then it will uncomment the JIRA_PLACEHOLDER line in the commit message template, and insert a link to the issue on issues.jboss.org.

Contributing

You want to make this even more awesome? That鈥檚 great! You can open a PR on Github (or any other repo hosting site that you may find this hosted), or email changes to me. Consider including a relevant gitmoji in the commit message!

If you fork and make your own custom changes but don鈥檛 want to bother proposing those changes back to the original repo (https://github.com/grdryn/gitconfig), that鈥檚 cool too; just consider sending me a link anyway so that I can see what cool things you鈥檙e doing. 馃槈