mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-01 12:56:54 +08:00
Add git-hooks install script. Update README.md
This commit is contained in:
parent
3f3f3c136e
commit
cc5b787e53
@ -6,9 +6,4 @@ For now, we just have `post-checkout` and `post-merge`,
|
||||
both of which just update submodules,
|
||||
so make sure that you have a fully synced repo whenever you checkout or pull.
|
||||
|
||||
To use these hooks, you can symlink or copy them to your `.git/hooks` directory.
|
||||
In `.git/hooks`, do:
|
||||
|
||||
ln -s ../../git-hooks/post-checkout post-checkout
|
||||
ln -s ../../git-hooks/post-merge post-merge
|
||||
|
||||
To use these hooks, run `./install-hooks.sh`.
|
||||
|
9
git-hooks/install-hooks.sh
Executable file
9
git-hooks/install-hooks.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DOTGIT=`git rev-parse --git-dir`
|
||||
TOPLEVEL=`git rev-parse --show-toplevel`
|
||||
TO=${DOTGIT}/hooks
|
||||
FROM=${TOPLEVEL}/git-hooks
|
||||
|
||||
ln -s ${FROM}/post-checkout ${TO}/post-checkout
|
||||
ln -s ${FROM}/post-merge ${TO}/post-merge
|
Loading…
Reference in New Issue
Block a user