[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] Symlink .git/hooks [Was: git: committing content and mode changes
From: |
Greg Chicares |
Subject: |
[lmi] Symlink .git/hooks [Was: git: committing content and mode changes together] |
Date: |
Fri, 4 Nov 2016 21:47:28 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.3.0 |
On 2016-11-04 20:00, Greg Chicares wrote:
[...]
> (2) Symlink a hooks directory:
>
> cd $(git rev-parse --show-toplevel)
> mkdir hooks
> ln --symbolic $(git rev-parse --show-toplevel)/hooks $(git rev-parse
> --show-toplevel)/.git/hooks
No, that would make hooks/pre-commit available as .git/hooks/hooks/pre-commit .
two "hooks": ^^^^^ ^^^^^
And this:
ln --symbolic $(git rev-parse --show-toplevel)/hooks $(git rev-parse
--show-toplevel)/.git
fails because .git/hooks already exists by default, so we want:
mv .git/hooks .git/hooks-orig
ln --symbolic $(git rev-parse --show-toplevel)/hooks $(git rev-parse
--show-toplevel)/.git
- [lmi] git: committing content and mode changes together, Greg Chicares, 2016/11/03
- Re: [lmi] git: committing content and mode changes together, Vadim Zeitlin, 2016/11/04
- Re: [lmi] git: committing content and mode changes together, Greg Chicares, 2016/11/04
- Re: [lmi] git: committing content and mode changes together, Vadim Zeitlin, 2016/11/04
- Re: [lmi] git: committing content and mode changes together, Greg Chicares, 2016/11/04
- Re: [lmi] git: committing content and mode changes together, Vadim Zeitlin, 2016/11/04
- Re: [lmi] git: committing content and mode changes together, Greg Chicares, 2016/11/04
- Re: [lmi] git: committing content and mode changes together, Vadim Zeitlin, 2016/11/04
- [lmi] Symlink .git/hooks [Was: git: committing content and mode changes together],
Greg Chicares <=
- Re: [lmi] Symlink .git/hooks [Was: git: committing content and mode changes together], Greg Chicares, 2016/11/05
- Re: [lmi] Symlink .git/hooks, Vadim Zeitlin, 2016/11/05
- Re: [lmi] Symlink .git/hooks, Greg Chicares, 2016/11/08