From 7f000a2d7368367f8c6d3bf7c15e7ad7b0782952 Mon Sep 17 00:00:00 2001 From: Przemyslaw Pawelczyk Date: Tue, 19 Jan 2016 21:23:16 +0100 Subject: examples/hooks/pre-commit: Add warning in comments re aborted commit. Fixes #26. --- examples/hooks/pre-commit | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/hooks/pre-commit b/examples/hooks/pre-commit index b91635d..de66e3e 100644 --- a/examples/hooks/pre-commit +++ b/examples/hooks/pre-commit @@ -2,6 +2,17 @@ # # An example hook script to store metadata information using # metastore on each commit. +# +# WARNING: +# +# If the commit is aborted (e.g. by not entering any synopsis), +# then updated metastore file (.metadata by default) is not reverted, +# so its new version remains in the index. +# To undo any changes in metastore file written since HEAD commit, +# you may want to reset and checkout HEAD version of the file: +# +# git reset HEAD -- .metadata +# git checkout HEAD -- .metadata MSFILE=".metadata" -- cgit v1.2.1