[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: How do you deal with incomplete commits?
From:       Nicolás_Alvarez <nicolas.alvarez () gmail ! com>
Date:       2020-11-02 18:08:53
Message-ID: CANPC-tt-VoPA+=DAo47B0gh=Xdn9UMh+wtH6uPQi31jGt1MOgw () mail ! gmail ! com
[Download RAW message or body]

El lun., 2 de nov. de 2020 a la(s) 15:01, David Hurka
(david.hurka@mailbox.org) escribió:
>
> > I ended up writing a local pre-commit hook, which has the advantage of
> > triggering on the commit directly after "the problem commit", thus
> > increasing the likelihood there is still a trivial way to sort
> > things out.
>
> It would probably be nice to have some post-checkout commit, with which you
> can spit you own WIP commit message in your face, right after you switch to
> your work branch.
>
> There are update.sample and post-update.sample, but my git knowledge is
> missing in this point. What is "update"?

You want 'post-checkout' for this. The 'update' and 'post-update'
aren't useful here, they are for the server-side of git push (see the
'githooks' manpage).

> And now that we discovered that this is possible: I would like to have the
> pre-commit hook globally, that would fit my workflow nicely. How can I do
> that? My home directory is unfortunately not a git repository. ;)

You can use ~/.gitconfig to change core.hooksPath to a central
directory, but then per-repository hooks will no longer work (search
hooksPath in the 'git-config' manpage). That's a shame, I hoped there
would be a way to have both global and per-repo hooks...

-- 
Nicolás
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic