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

Re: Why does git track directory listed in .gitignore/".git/info/exclude"?

From
PRpradeep singh rautela <rautelap@gmail.com>
Date
Jan 23, 2008, 14:04 UTC
Message-ID
<6bc632150801230604p2589c893pa05bb6f27e482de8@mail.gmail.com>
In-Reply-To
<6bc632150801230554l3b24e1e4lb4641bf7c16857c0@mail.gmail.com>

Apologies to all.Kindly pardon my novice experiments with git. Some more trial and error method led to find that you have to put a * at the end of the directory too. i.e xen-3.1.0-src/*

But i still would like to ask git gurus here. Isn't it fine to include a directory name as

   $directory_name/
    instead of
   $directory_name/*

? Thoughts?

Thanks,
          --Pradeep
On 23/01/2008, pradeep singh rautela <rautelap@gmail.com> wrote:
Show 40 quoted lines
> Hi All,
>
> I have an source directory, which in turn has some other directories too.
> I do not want to track one of these directories.
> So i added the directory name in .gitignore as well as in
> .git/info/exclude for my repo.
>
> i.e i have added following line to both of them -
> xen-3.1.0-src/
>
> I copied xen-3.1.0-src from archives in the git repo's base directory.
>
> Now when i do a git-status i get
> # On branch master
> # Untracked files:
> #   (use "git add <file>..." to include in what will be committed)
> #
> #       xen-3.1.0-src/
> nothing added to commit but untracked files present (use "git add" to track)
>
> Why is git seeing xen-3.1.0-src directory at all?
> Is this the expected behaviour?
>
> I thought i should not get this message after adding relevant entries
> in .gitignore or in info/exclude .
>
> What am i doing wrong here?
> Is there a way that this can be done without having to witness this
> message everytime i do a git status?
>
> Please CC me as I am not subscribed to the list.
>
> Thanks,
>          ~Pradeep
> --
> --
> pradeep singh rautela
> http://eagain.wordpress.com
> http://emptydomain.googlepages.com
>
-- 
--
pradeep singh rautela
http://eagain.wordpress.com
http://emptydomain.googlepages.com
Previous: pradeep singh rautelaNext: Linus Torvalds
Message 2 of 20 in “Why does git track directory listed in .gitignore/".git/info/exclude"?”
  1. pradeep singh rautelaJan 23, 2008
  2. pradeep singh rautelaJan 23, 2008
  3. Linus TorvaldsJan 23, 2008
  4. pradeep singh rautelaJan 24, 2008
  5. Adam PiatyszekJan 30, 2008
  6. Junio C HamanoJan 30, 2008
  7. Junio C HamanoJan 30, 2008
  8. Adam PiatyszekJan 31, 2008
  9. *Re: Why does git track directory listed in .gitignore/".git/info/exclude"?Junio C Hamano, Jan 31, 2008
  10. gitignore(5): Allow "foo/" in ignore list to match directory "foo"Junio C Hamano, Jan 31, 2008
  11. Jeff KingJan 31, 2008
  12. Junio C HamanoJan 31, 2008
  13. Jeff KingJan 31, 2008
  14. Johannes SchindelinJan 31, 2008
  15. pradeep singh rautelaJan 31, 2008
  16. Junio C HamanoJan 31, 2008
  17. Adam PiatyszekJan 31, 2008
  18. Andreas EricssonFeb 1, 2008
  19. Adam PiatyszekJan 31, 2008
  20. Wayne DavisonJan 23, 2008

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.