{"thread":{"id":"63893","subject":".env is not being ignored by this .gitignore file.","startedAt":"2025-08-01T20:13:35Z","lastAt":"2025-08-01T20:44:42Z","messageCount":3,"participants":["Skybuck Flying","rsbecker@nexbridge.com"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"523236","messageId":"DB7PR02MB426582D352EC00FDCDC5CD45B326A@DB7PR02MB4265.eurprd02.prod.outlook.com","threadId":"63893","inReplyTo":null,"subject":".env is not being ignored by this .gitignore file.","fromName":"Skybuck Flying","fromEmail":"skybuck2000@hotmail.com","sentAt":"2025-08-01T20:13:32Z","receivedAt":"2025-08-01T20:13:35Z","isPatch":false,"sender":{"key":"skybuck2000@hotmail.com","avatar":"https://gravatar.com/avatar/4ab663b18fe6174125b5b436538d435bbddad844433e1165b4d64363106e4114?d=mp&s=160"},"body":"Command line tool \"Gemini cli\" uses .env text files to store API keys.\n\nI am trying to make git version 2.43.0.windows.1 ignore these .env files.\n\nHowever for some reason it refuses to do so. (Any idea why ?)\n\nHere is the .gitignore file:\n\n# Modern Delphi 12.3 .gitignore\n#\n#-------------------------------------------------------------------------------\n# Delphi / C++Builder Compiled Output & Binaries\n#-------------------------------------------------------------------------------\n*.exe\n*.dll\n*.so\n*.a\n*.lib\n*.bpl\n*.dcp\n*.dcu\n*.obj\n*.o\n*.res # Compiled resource files\n\n#-------------------------------------------------------------------------------\n# IDE Generated, User-Specific & Intermediate Files\n#-------------------------------------------------------------------------------\n*.~*\n*.bak\n*.old\n*.tmp # General temporary files\n*.temp # General temporary files\n*.local\n*.dsk\n*.cfg\n*.map\n*.tds\n*.drc\n*.rsm\n*.log\n*.pch\n*.ipch\n*.stat\n*.identcache\n*.dproj.local\n*.dproj.user\n*.groupproj.local\n*.groupproj.user\n*.bkm # Delphi IDE bookmarks\n*.tvsconfig # TestInsight configuration files\n*.history # Files with .history extension\n\n# Legacy project files\n*.dof\n*.kof\n\n#-------------------------------------------------------------------------------\n# IDE History, Recovery & Autosave\n#-------------------------------------------------------------------------------\n**/__history/\n**/__recovery/\n*.autosave\n\n#-------------------------------------------------------------------------------\n# Output Directories (using **/ to match at any depth)\n#-------------------------------------------------------------------------------\n**/Win32/\n**/Win64/\n**/Debug/\n**/Release/\n\n# Cross-platform output folders\n**/Linux64/\n**/OSX64/\n**/OSXARM64/\n**/Android/\n**/Android64/\n**/iOSDevice32/\n**/iOSDevice64/\n**/iOSSimulator/\n\n#-------------------------------------------------------------------------------\n# Common Temporary / Local / Sensitive Files (General)\n#-------------------------------------------------------------------------------\n*.zip # General compressed archives (often backups or downloads)\n*.env # Environment variable files (CRITICAL for sensitive data)"},{"id":"523237","messageId":"DB7PR02MB4265CD53B0FAC6F2AC7EC02FB326A@DB7PR02MB4265.eurprd02.prod.outlook.com","threadId":"63893","inReplyTo":"DB7PR02MB426582D352EC00FDCDC5CD45B326A@DB7PR02MB4265.eurprd02.prod.outlook.com","subject":"Re: .env is not being ignored by this .gitignore file.","fromName":"Skybuck Flying","fromEmail":"skybuck2000@hotmail.com","sentAt":"2025-08-01T20:24:36Z","receivedAt":"2025-08-01T20:24:38Z","isPatch":false,"sender":{"key":"skybuck2000@hotmail.com","avatar":"https://gravatar.com/avatar/4ab663b18fe6174125b5b436538d435bbddad844433e1165b4d64363106e4114?d=mp&s=160"},"body":"Tested it once more in a new repo, issue confirmed.\n\nAs I suspected the problem seems to be with the comments at the end of the line (especially last line .env # problem comments)\n\nTo be on the safe side, .gitignore updated to place all comments on a separate line, this should solve the problem.\n\n# Modern Delphi 12.3 .gitignore\n#\n#-------------------------------------------------------------------------------\n# Delphi / C++Builder Compiled Output & Binaries\n#-------------------------------------------------------------------------------\n*.exe\n*.dll\n*.so\n*.a\n*.lib\n*.bpl\n*.dcp\n*.dcu\n*.obj\n*.o\n\n# Compiled resource files\n*.res\n\n#-------------------------------------------------------------------------------\n# IDE Generated, User-Specific & Intermediate Files\n#-------------------------------------------------------------------------------\n*.~*\n*.bak\n*.old\n\n# General temporary files\n*.tmp\n\n# General temporary files\n*.temp\n\n*.local\n*.dsk\n*.cfg\n*.map\n*.tds\n*.drc\n*.rsm\n*.log\n*.pch\n*.ipch\n*.stat\n*.identcache\n*.dproj.local\n*.dproj.user\n*.groupproj.local\n*.groupproj.user\n\n# Delphi IDE bookmarks\n*.bkm\n\n# TestInsight configuration files\n*.tvsconfig\n\n# Files with .history extension\n*.history\n\n# Legacy project files\n*.dof\n*.kof\n\n#-------------------------------------------------------------------------------\n# IDE History, Recovery & Autosave\n#-------------------------------------------------------------------------------\n**/__history/\n**/__recovery/\n*.autosave\n\n#-------------------------------------------------------------------------------\n# Output Directories (using **/ to match at any depth)\n#-------------------------------------------------------------------------------\n**/Win32/\n**/Win64/\n**/Debug/\n**/Release/\n\n# Cross-platform output folders\n**/Linux64/\n**/OSX64/\n**/OSXARM64/\n**/Android/\n**/Android64/\n**/iOSDevice32/\n**/iOSDevice64/\n**/iOSSimulator/\n\n#-------------------------------------------------------------------------------\n# Common Temporary / Local / Sensitive Files (General)\n#-------------------------------------------------------------------------------\n# General compressed archives (often backups or downloads)\n*.zip\n\n# Environment variable files (CRITICAL for sensitive data)\n*.env\n"},{"id":"523240","messageId":"01ef01dc0323$ed679700$c836c500$@nexbridge.com","threadId":"63893","inReplyTo":"DB7PR02MB426582D352EC00FDCDC5CD45B326A@DB7PR02MB4265.eurprd02.prod.outlook.com","subject":"RE: .env is not being ignored by this .gitignore file.","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2025-08-01T20:36:09Z","receivedAt":"2025-08-01T20:44:42Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On August 1, 2025 4:14 PM Skybuck Flying wrote:\n>Command line tool \"Gemini cli\" uses .env text files to store API keys.\n>\n>I am trying to make git version 2.43.0.windows.1 ignore these .env files.\n>\n>However for some reason it refuses to do so. (Any idea why ?)\n>\n>Here is the .gitignore file:\n>\n># Modern Delphi 12.3 .gitignore\n>#\n>#--------------------------------------------------------------------------\n-----\n># Delphi / C++Builder Compiled Output & Binaries\n>#--------------------------------------------------------------------------\n-----\n>*.exe\n>*.dll\n>*.so\n>*.a\n>*.lib\n>*.bpl\n>*.dcp\n>*.dcu\n>*.obj\n>*.o\n>*.res # Compiled resource files\n>\n>#--------------------------------------------------------------------------\n-----\n># IDE Generated, User-Specific & Intermediate Files\n>#--------------------------------------------------------------------------\n-----\n>*.~*\n>*.bak\n>*.old\n>*.tmp # General temporary files\n>*.temp # General temporary files\n>*.local\n>*.dsk\n>*.cfg\n>*.map\n>*.tds\n>*.drc\n>*.rsm\n>*.log\n>*.pch\n>*.ipch\n>*.stat\n>*.identcache\n>*.dproj.local\n>*.dproj.user\n>*.groupproj.local\n>*.groupproj.user\n>*.bkm # Delphi IDE bookmarks\n>*.tvsconfig # TestInsight configuration files *.history # Files with\n.history extension\n>\n># Legacy project files\n>*.dof\n>*.kof\n>\n>#--------------------------------------------------------------------------\n-----\n># IDE History, Recovery & Autosave\n>#--------------------------------------------------------------------------\n-----\n>**/__history/\n>**/__recovery/\n>*.autosave\n>\n>#--------------------------------------------------------------------------\n-----\n># Output Directories (using **/ to match at any depth)\n>#--------------------------------------------------------------------------\n-----\n>**/Win32/\n>**/Win64/\n>**/Debug/\n>**/Release/\n>\n># Cross-platform output folders\n>**/Linux64/\n>**/OSX64/\n>**/OSXARM64/\n>**/Android/\n>**/Android64/\n>**/iOSDevice32/\n>**/iOSDevice64/\n>**/iOSSimulator/\n>\n>#--------------------------------------------------------------------------\n-----\n># Common Temporary / Local / Sensitive Files (General)\n>#--------------------------------------------------------------------------\n-----\n>*.zip # General compressed archives (often backups or downloads) *.env #\n>Environment variable files (CRITICAL for sensitive data)=\n\nIt does not work when .gitignore contains\n*.zip # Something\n*.env # Something else\n\nBut does correctly for\n*.zip\n*.env\n\nTry removing the comment or move it to the prior line. I am on git 2.45.1.\n\n--Randall\n\n"}]}