git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: .gitignore behavior on Mac

From
John Keeping <john@keeping.me.uk>
Date
May 18, 2013, 18:41 UTC
Message-ID
<20130518184136.GH27005@serenity.lan>
In-Reply-To
<CAEe6bfD_1GjMBByaEFQ4RMTMaz8XZvd00mxyfaAHtXVpbUjj6A@mail.gmail.com>
On Sat, May 18, 2013 at 08:36:42PM +0200, Peter Lauri wrote:
Show 20 quoted lines
> Shouldn't this be valid? I would expect to NOT see the
> core/inc/config.inc.php in the "git status" output...
> 
> Peters-MacBook-Air:dt-git plauri$ cat .gitignore
> .buildpath
> .project
> .settings/
> web/pjotr.php
> core/inc/config.inc.php
> dt_error.log
> process_wrapper.sh
> 
> Peters-MacBook-Air:dt-git plauri$ git status
> # On branch local/DT-7_gantt
> # Changes not staged for commit:
> #   (use "git add <file>..." to update what will be committed)
> #   (use "git checkout -- <file>..." to discard changes in working directory)
> #
> # modified:   .gitignore
> # modified:   core/inc/config.inc.php

core/inc/config.inc.php is already in the repository. Git won't ignore files that are already tracked.

If you remove the file from the index:
    git rm --cached core/inc/config.inc.php

then you'll see it as deleted in "git status" but it won't appear in the untracked files section even though it's still there in the working tree.

Show 11 quoted lines
> # Untracked files:
> #   (use "git add <file>..." to include in what will be committed)
> #
> # out.ionel
> # tree.py
> no changes added to commit (use "git add" and/or "git commit -a")
> Peters-MacBook-Air:dt-git plauri$
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Peter LauriNext: Peter Lauri
Message 2 of 8 in “.gitignore behavior on Mac”
  1. Peter LauriMay 18, 2013
  2. John KeepingMay 18, 2013
  3. Peter LauriMay 18, 2013
  4. John KeepingMay 18, 2013
  5. Johannes SixtMay 18, 2013
  6. Peter LauriMay 18, 2013
  7. Junio C HamanoMay 19, 2013
  8. Antony MaleMay 19, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.