All of lore.kernel.org
 help / color / mirror / Atom feed
From: <rsbecker@nexbridge.com>
To: "'Skybuck Flying'" <skybuck2000@hotmail.com>, <git@vger.kernel.org>
Subject: RE: .env is not being ignored by this .gitignore file.
Date: Fri, 1 Aug 2025 16:36:09 -0400	[thread overview]
Message-ID: <01ef01dc0323$ed679700$c836c500$@nexbridge.com> (raw)
In-Reply-To: <DB7PR02MB426582D352EC00FDCDC5CD45B326A@DB7PR02MB4265.eurprd02.prod.outlook.com>

On August 1, 2025 4:14 PM Skybuck Flying wrote:
>Command line tool "Gemini cli" uses .env text files to store API keys.
>
>I am trying to make git version 2.43.0.windows.1 ignore these .env files.
>
>However for some reason it refuses to do so. (Any idea why ?)
>
>Here is the .gitignore file:
>
># Modern Delphi 12.3 .gitignore
>#
>#--------------------------------------------------------------------------
-----
># Delphi / C++Builder Compiled Output & Binaries
>#--------------------------------------------------------------------------
-----
>*.exe
>*.dll
>*.so
>*.a
>*.lib
>*.bpl
>*.dcp
>*.dcu
>*.obj
>*.o
>*.res # Compiled resource files
>
>#--------------------------------------------------------------------------
-----
># IDE Generated, User-Specific & Intermediate Files
>#--------------------------------------------------------------------------
-----
>*.~*
>*.bak
>*.old
>*.tmp # General temporary files
>*.temp # General temporary files
>*.local
>*.dsk
>*.cfg
>*.map
>*.tds
>*.drc
>*.rsm
>*.log
>*.pch
>*.ipch
>*.stat
>*.identcache
>*.dproj.local
>*.dproj.user
>*.groupproj.local
>*.groupproj.user
>*.bkm # Delphi IDE bookmarks
>*.tvsconfig # TestInsight configuration files *.history # Files with
.history extension
>
># 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)
>#--------------------------------------------------------------------------
-----
>*.zip # General compressed archives (often backups or downloads) *.env #
>Environment variable files (CRITICAL for sensitive data)=

It does not work when .gitignore contains
*.zip # Something
*.env # Something else

But does correctly for
*.zip
*.env

Try removing the comment or move it to the prior line. I am on git 2.45.1.

--Randall


      parent reply	other threads:[~2025-08-01 20:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-01 20:13 .env is not being ignored by this .gitignore file Skybuck Flying
2025-08-01 20:24 ` Skybuck Flying
2025-08-01 20:36 ` rsbecker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01ef01dc0323$ed679700$c836c500$@nexbridge.com' \
    --to=rsbecker@nexbridge.com \
    --cc=git@vger.kernel.org \
    --cc=skybuck2000@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.