Confused why files in .gitignore are still showing as "Untracked" instead of not showing at all?

370 views
Skip to first unread message

dylanh724

unread,
Jul 10, 2017, 3:28:04 AM7/10/17
to SmartGit

This is really confusing me because the files that SHOULD be ignored are showing with the files that SHOULD be added:


For example, EmptyDirectoriesRemover.cs should actually be ADDED (not ignored), but it's mixed in with all these Temp/ files that should ignored.


Is my ignore file wrong? Should it be "Temp/" instead of "/Temp/" (remove the prefix "/")?





Thank you !!
Message has been deleted

syntevo Support

unread,
Jul 10, 2017, 4:44:57 AM7/10/17
to smar...@googlegroups.com
> Is my ignore file wrong? Should it be "Temp/" instead of "/Temp/" (remove
> the prefix "/")?

It looks good and for me /[Tt]emp/ works fine. What does "git status" show?

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com


07/10/2017 09:28 - dylanh724 wrote:

>
>
> This is really confusing me because *the files that SHOULD be ignored are
> showing with the files that SHOULD be added:*
>
>
> For example, *EmptyDirectoriesRemover.cs *should actually be ADDED (not
> ignored), but it's mixed in with all these Temp/ files that should ignored.
>
>
> Is my ignore file wrong? Should it be "Temp/" instead of "/Temp/" (remove
> the prefix "/")?
>
>
>
> <https://i.imgur.com/FM3TIg9.png>
>
>
> Thank you !!
>
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To post to this group, send email to smar...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/a8e02ec5-bba6-4f92-8a3e-3b56e355a362%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

syntevo Support

unread,
Jul 10, 2017, 4:56:22 AM7/10/17
to smar...@googlegroups.com
> Because your file is wrong !! The .gitignore (and other) files use
> filename globs, not regular expressions.

[] is supported (by Git).

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com


07/10/2017 10:53 - Thibault M. wrote:

> Because your file is wrong !! The .gitignore (and other) files use
> filename globs, not regular expressions.
>
>
>
> Le lundi 10 juillet 2017 09:28:04 UTC+2, dylanh724 a écrit :
> >
> > This is really confusing me because *the files that SHOULD be ignored are
> > showing with the files that SHOULD be added:*
> >
> >
> > For example, *EmptyDirectoriesRemover.cs *should actually be ADDED (not
> > ignored), but it's mixed in with all these Temp/ files that should ignored.
> >
> >
> > Is my ignore file wrong? Should it be "Temp/" instead of "/Temp/" (remove
> > the prefix "/")?
> >
> >
> >
> > <https://i.imgur.com/FM3TIg9.png>
> >
> >
> > Thank you !!
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To post to this group, send email to smar...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/081b03a4-9305-4aa0-91f5-ed2027253aa6%40googlegroups.com.

dylanh724

unread,
Jul 10, 2017, 6:25:14 AM7/10/17
to SmartGit, smar...@syntevo.com
(Is there an easier way to "git status" than right click repo >> git shell >> type 'git status' in shell?)

git status:


Still show /Temp/ in untracked files. It shouldn't be there at all, if in the .gitignore (right?)

syntevo Support

unread,
Jul 11, 2017, 4:07:09 AM7/11/17
to smar...@googlegroups.com
> (Is there an easier way to "git status" than right click repo >> git shell
> >> type 'git status' in shell?)
>
> *git status:*
>
> <https://i.imgur.com/xDiPCMg.png>
>
>
> Still show */Temp/ *in untracked files. It shouldn't be there at all, if in
> the .gitignore (right?)

You seem to have ignored path /Temp relative to your repository root, however the root-relative path is actually /i42-tol-win64/Temp . Hence, both /i42-tol-win64/[Tt]emp/ and [Tt]emp/ should work. I would prefer the first one for reasons of simplicity.

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com


07/10/2017 12:26 - dylanh724 wrote:

> (Is there an easier way to "git status" than right click repo >> git shell
> >> type 'git status' in shell?)
>
> *git status:*
>
> <https://i.imgur.com/xDiPCMg.png>
>
>
> Still show */Temp/ *in untracked files. It shouldn't be there at all, if in
> > > smartgit+u...@googlegroups.com <javascript:>.
> > > To post to this group, send email to smar...@googlegroups.com
> > <javascript:>.
> > > To view this discussion on the web visit
> > >
> > https://groups.google.com/d/msgid/smartgit/a8e02ec5-bba6-4f92-8a3e-3b56e355a362%40googlegroups.com.
> >
> > > For more options, visit https://groups.google.com/d/optout.
> > >
>
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To post to this group, send email to smar...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/0e7b6f9c-5a64-4318-9919-c4b4b870cd8b%40googlegroups.com.

dylanh724

unread,
Jul 11, 2017, 5:20:18 AM7/11/17
to SmartGit
OH!! I'm still getting used to git ignores, ahhh... thank you so much.

so /<this_is_root/ because of the "/" at the beginning.

If I put NO "/" prefix, then it just means any folder anywhere within (probably dangerous), hm?

Thanks for help -- I missed that note!
Reply all
Reply to author
Forward
0 new messages