From 1c78a21eb8d47c9e1eeb5e563f3d92520aec0168 Mon Sep 17 00:00:00 2001 From: boyska Date: Fri, 10 Aug 2018 12:00:20 +0200 Subject: [PATCH] git guidelines --- doc/GIT.md | 21 +++++++++++++++++++++ HACKING.md => doc/HACKING.md | 0 doc/gitmessage | 8 ++++++++ 3 files changed, 29 insertions(+) create mode 100644 doc/GIT.md rename HACKING.md => doc/HACKING.md (100%) create mode 100644 doc/gitmessage diff --git a/doc/GIT.md b/doc/GIT.md new file mode 100644 index 0000000..768626e --- /dev/null +++ b/doc/GIT.md @@ -0,0 +1,21 @@ +# Using git + +## Howto + +## Guidelines + +### Commit message + +You can drink&code, but you can't drink&git! + + git config --local commit.template doc/gitmessage + +As the message explains, please add a prefix to your commit showing the "subject" of your commit. +If your commit covers too many topic, it might be that it is just wrong. +However, sometimes it is fine: for example, if you write some PHP code on tt-rss which adds a new dependency +on some PHP extension, you will need to add that dependency into Dockerfile-tt-rss. So, both [D] and [TT] +could apply. +When multiple subjects apply, choose which is more important to you. 2 prefixes are allowed, if you really +think so. +Remember: if we wanted to know what changed in your commit, we would use git log --stat. The commit prefix +should catch the "spirit" of the commit. diff --git a/HACKING.md b/doc/HACKING.md similarity index 100% rename from HACKING.md rename to doc/HACKING.md diff --git a/doc/gitmessage b/doc/gitmessage new file mode 100644 index 0000000..c0c743e --- /dev/null +++ b/doc/gitmessage @@ -0,0 +1,8 @@ + + +# [D] = differences in docker{,-compose}; [TT] = tt-rss; [BR] = rss-bridge +# First line is WHY (50chars), should complete the sentence +# If applied, this commit will... +# Body is WHAT +# Never explain how: the diff itself will +# Best practice: http://chris.beams.io/posts/git-commit/