git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Keeping <john@keeping.me.uk>
To: Peter Lauri <peterlauri@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: .gitignore behavior on Mac
Date: Sat, 18 May 2013 19:41:36 +0100	[thread overview]
Message-ID: <20130518184136.GH27005@serenity.lan> (raw)
In-Reply-To: <CAEe6bfD_1GjMBByaEFQ4RMTMaz8XZvd00mxyfaAHtXVpbUjj6A@mail.gmail.com>

On Sat, May 18, 2013 at 08:36:42PM +0200, Peter Lauri wrote:
> 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.

> # 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

  reply	other threads:[~2013-05-18 18:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-18 18:36 .gitignore behavior on Mac Peter Lauri
2013-05-18 18:41 ` John Keeping [this message]
2013-05-18 18:43   ` Peter Lauri
2013-05-18 18:55     ` John Keeping
2013-05-18 21:01       ` Johannes Sixt
2013-05-18 22:37         ` Peter Lauri
2013-05-19  7:47           ` Junio C Hamano
2013-05-19 10:54           ` Antony Male

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=20130518184136.GH27005@serenity.lan \
    --to=john@keeping.me.uk \
    --cc=git@vger.kernel.org \
    --cc=peterlauri@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).