Re: .env is not being ignored by this .gitignore file.
- From
Skybuck Flying <skybuck2000@hotmail.com>
- Date
- Aug 1, 2025, 20:24 UTC
- Message-ID
- <DB7PR02MB4265CD53B0FAC6F2AC7EC02FB326A@DB7PR02MB4265.eurprd02.prod.outlook.com>
- In-Reply-To
- <DB7PR02MB426582D352EC00FDCDC5CD45B326A@DB7PR02MB4265.eurprd02.prod.outlook.com>
Tested it once more in a new repo, issue confirmed.
As I suspected the problem seems to be with the comments at the end of the line (especially last line .env # problem comments)
To be on the safe side, .gitignore updated to place all comments on a separate line, this should solve the problem.
# Modern Delphi 12.3 .gitignore # #------------------------------------------------------------------------------- # Delphi / C++Builder Compiled Output & Binaries #------------------------------------------------------------------------------- *.exe *.dll *.so *.a *.lib *.bpl *.dcp *.dcu *.obj *.o
# Compiled resource files *.res
#------------------------------------------------------------------------------- # IDE Generated, User-Specific & Intermediate Files #------------------------------------------------------------------------------- *.~* *.bak *.old
# General temporary files *.tmp
# General temporary files *.temp
*.local *.dsk *.cfg *.map *.tds *.drc *.rsm *.log *.pch *.ipch *.stat *.identcache *.dproj.local *.dproj.user *.groupproj.local *.groupproj.user
# Delphi IDE bookmarks *.bkm
# TestInsight configuration files *.tvsconfig
# Files with .history extension *.history
# Legacy project files *.dof *.kof
#------------------------------------------------------------------------------- # IDE History, Recovery & Autosave #------------------------------------------------------------------------------- **/__history/ **/__recovery/ *.autosave
#------------------------------------------------------------------------------- # Output Directories (using **/ to match at any depth) #------------------------------------------------------------------------------- **/Win32/ **/Win64/ **/Debug/ **/Release/
# Cross-platform output folders **/Linux64/ **/OSX64/ **/OSXARM64/ **/Android/ **/Android64/ **/iOSDevice32/ **/iOSDevice64/ **/iOSSimulator/
#------------------------------------------------------------------------------- # Common Temporary / Local / Sensitive Files (General) #------------------------------------------------------------------------------- # General compressed archives (often backups or downloads) *.zip
# Environment variable files (CRITICAL for sensitive data) *.env