ddev-intellij-plugin icon indicating copy to clipboard operation
ddev-intellij-plugin copied to clipboard

Plugin generates untracked files

Open mikesnoeren opened this issue 1 year ago • 6 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Are you sure that this bug is related to this DDEV Integration Plugin?

  • [X] I am sure

Enter your error report ID (If available)

No response

Describe the bug

When opening a DDEV project in PhpStorm for the first time, the plugin generates several files within the ./.ddev/ folder. Initially, no .gitignore file is present in this directory, which results in these generated files being tracked by Git. Once the project is started, a .gitignore file is created by DDEV, and files are properly ignored.

However, our workflow involves occasionally pulling in projects to review code without starting them. This process generates files that remain as uncommitted changes, cluttering the working directory.

To address this issue, we need a solution to prevent these files from being tracked until a .gitignore is generated by ddev, would that be possible?

Steps to reproduce

  1. Open ddev project that has never been started, with ddev-intellij-plugin installed.
  2. Check .ddev folder for uncommited changes.

Additional context

No response

mikesnoeren avatar Aug 26 '24 08:08 mikesnoeren

Previous link is malware post, please delete

rfay avatar Aug 26 '24 09:08 rfay

It looks like ddev start is one of the few commands that creates the .gitignore. The majority of commands - such as ddev --version that is being called on project opening - create files in the .ddev directory, but without a .gitignore. So that seems like an issue in DDEV itself to me.

Looking at the DDEV code itself, PopulateExamplesCommandsHomeadditions is being run on init, which copies dotddev_assets to .ddev, as soon as you're within a project directory, no matter which command is called. While that in itself is an unexpected program behaviour to me, it wouldn't really be an issue if that assets skeleton also included a default .gitignore file.

AkibaAT avatar Aug 26 '24 18:08 AkibaAT

@mikesnoeren and @AkibaAT,

Please test:

  • https://github.com/ddev/ddev/pull/6510#issuecomment-2312399232

stasadev avatar Aug 27 '24 12:08 stasadev

@mikesnoeren and @AkibaAT,

Please test:

Thanks. Looks good to me, git status is staying clean with that version.

AkibaAT avatar Aug 27 '24 21:08 AkibaAT

All good here too!

mikesnoeren avatar Sep 02 '24 10:09 mikesnoeren

To recreate the problem with current DDEV:

mkdir ~/junk && cd ~/junk
ddev config --auto
git add .
git commit -m "my project"
rm -r .ddev
git reset --hard
ddev --version
git status

rfay avatar Sep 03 '24 21:09 rfay

Okay, so I concider this issue solved, as it was an issue with a previous ddev version. In case its not, feel free to comment or reopen.

nico-loeber avatar Nov 24 '24 18:11 nico-loeber