문제

If I have a local repository pulled from a remote one, and I add git hooks to my local repository before I push it back to the remote one, do the hooks go to the remote repo with the code?

도움이 되었습니까?

해결책

Nope. Nothing that you add directly under the .git directory will be sent from clone to clone, including hooks. It's a little inconvenient sometimes, but it also means that you can easily have different hooks in different clones, so it's a tradeoff.

One strategy is to put your hook scripts in a directory that is tracked by git, and write a script that symlinks them in to .git, so developers can easily wire them up in a fresh clone.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top