Re: .gitignore behavior on Mac

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]