Fails to configure in git worktree
See original GitHub issue$ git worktree add ../branch
$ cd ../branch
$ ./gradlew
FAILURE: Build failed with an exception.
* What went wrong:
Could not create task ':installKotlinterPrePushHook'.
> Could not create task of type 'InstallPrePushHookTask'.
> Not a directory
as https://github.com/jeremymailen/kotlinter-gradle/blob/4f6944a0ca8eba4573467c24c52515b5303d5772/src/main/kotlin/org/jmailen/gradle/kotlinter/tasks/GitHookTasks.kt#L40 tries to mkdirs()
immediately upon configuration, but in a git worktree, .git
is actually a text file that points to the shared GIT_DIR.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
git worktree is invalid, how to correct this with git commands
The core.worktree setting is documented. If you want to change it using a Git command, use git config core.worktree new-setting .
Read more >git-worktree Documentation - Git
By default, add refuses to create a new worktree when <commit-ish> is a branch name and is already checked out by another worktree,...
Read more >Unable to build when using git worktree · Issue #32568 - GitHub
When using a worktree ./.git is not a directory, but a file that lists a directory reference to the primary clone. This command...
Read more >SonarQube Scanner fails with "Not inside a git worktree" error
config ' is not located under the root directory '/home/travis/build/presque-fini' and will not be analyzed. The SONAR_SCANNER_HOME environment ...
Read more >git worktree fails only for master branch - Google Groups
I'm working on some server-side software to do a merge. By using git worktree it's possible to check out a given branch for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I see, my apologies for not seeing that detail. Not sure why I didn’t run into that problem testing it. Will investigate and fix.
Ok, actually fixed this time. Release 3.1.1.