git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Kai Schlamp <schlamp@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: Beginner problem with .gitignore
Date: Tue, 21 Apr 2009 10:51:32 +0200	[thread overview]
Message-ID: <49ED8914.9090808@drmicha.warpmail.net> (raw)
In-Reply-To: <gsid27$p1$1@ger.gmane.org>

Kai Schlamp venit, vidit, dixit 20.04.2009 19:57:
> Hello.
> 
> I have a file called TitleAreaDialog.java in the folder
> my_path\org.eclipse.jface\src\org\eclipse\jface\dialogs
> 
> .git and .gitignore is in the my_path\ folder (using Git Cygwin on Windows).
> 
> Now I everything is ignored from org.eclipse.jface, but not that 
> TitleAreaDialog.java
> 
> So I specified the following in .gitignore:
> /org.eclipse.*
> !TitleAreaDialog.java
> 
> I also tried it with:
> !Title*, 
> !/org.eclipse.jface/src/org/eclipse/jface/dialogs/TitleAreaDialog.java
> 
> but the TitleAreaDialog is always ignored as well.

By "is ignored", do you mean that git status doesn't show it? git status
does not recurse into subdirectories by default unless there is at least
one tracked file inside.

> 
> What do I have to do to not ignore this file specifically?

Have you ever added that file?

If you only want to track a few files it's easiest to ignore everything
and git add those files. Once added they will be tracked no matter what
the ignore patterns say.

Michael

  reply	other threads:[~2009-04-21  8:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 17:57 Beginner problem with .gitignore Kai Schlamp
2009-04-21  8:51 ` Michael J Gruber [this message]
2009-04-21  9:57   ` Kai Schlamp
2009-04-21 11:43     ` Michael J Gruber
2009-04-21 12:26       ` Kai Schlamp

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=49ED8914.9090808@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=schlamp@gmx.de \
    /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).