fix: keep the git directory for worktree-enabled installations

Git worktrees do not include the full .git directory - only a pointer to the actual directory - when keep-git-dir is set to true, which is incorrect for built containers. This change special-cases that combination, allowing folks on newer git installs to actually keep the .git directory during the build process.

Closes #4415
This commit is contained in:
Jose Diaz-Gonzalez
2021-02-20 17:07:52 -05:00
parent 757a829137
commit 3ae9feba8f
4 changed files with 125 additions and 51 deletions

View File

@@ -109,6 +109,8 @@ dokku git:set node-js-app keep-git-dir false
dokku git:set node-js-app keep-git-dir ""
```
Please keep in mind that setting `keep-git-dir` to `true` may result in unstaged changes shown within the built container due to the build process generating application changes within the built app directory.
### Initializing an app repository from a remote repository
> The application must exist before the repository can be initialized