Git pre-push hook should be generated to location defined by `core.hooksPath`
- Lenguaje dominante
- Java
- Estrellas
- 5.7k
- Forks
- 561
- Merge medio
- 1 d 14 h
- PR fusionados (30 d)
- 43
Descripción
In our project, we define all our git hooks at `.githooks`, so we can version control them and have them shared amongst our team. We recommend that those in our project set up the git hooks by running `git config --local unset core.hooksPath`.
The git pre-push hook generated by `./gradlew spotlessInstallGitPrePushHook` writes the hook to `.git/hooks`, instead of wherever `git config core.hooksPath` is pointing to. By default, `git config core.hooksPath` is equivalent to `.git/hooks`, but it can be customised to something else, like in our case.
Guía de contribución
Línea de trabajo
Start with the ./gradlew spotlessInstallGitPrePushHook entry point and trace where it chooses the hook destination. Check how the configured core.hooksPath and the default .git/hooks location are handled. Done means the generated pre-push hook is written to the configured path, while retaining the default behavior when no custom path is set.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- build-system
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100