git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Feature Request - Hide ignored files before checkout
@ 2012-12-08  0:50 Matthew Ciancio
  2012-12-08 19:21 ` Chris Rorvick
  2012-12-10  1:46 ` Andrew Ardill
  0 siblings, 2 replies; 9+ messages in thread
From: Matthew Ciancio @ 2012-12-08  0:50 UTC (permalink / raw)
  To: git

To whom it may concern,

I am not sure if this is the right place to send this, but I couldn't find
anything on the web that seemed official, so here goes.

Imagine this scenario:

1) You have a Git repo with two branches (branchA and branchB), which are
currently identical.
2) Checkout to branch.
3) Create file foo.txt, stage it and commit it.
4) Create file ignore.txt and add it to the ".gitignore" file of branchB so
that it is successfully ignored by Git.
5) Checkout to branchA.

Problem: ignore.txt does not "disappear" like foo.txt does and is now just
sitting in branchA (and now any other branch I checkout into).

When I first started using Git, I genuinely thought this was a bug, because
it seems so logical to me that ignore files should hide/reappear just like
tracked files do, when switching branches.
I have been told ways of circumventing this (using commits and un-commits OR
using stash), but my reason for avoiding commits is: say you have binary/OS
specific files which really do not belong in the commit logs (even locally)
and hence should be ignored. What if you want those files in only one branch
and not all?
Stashing doesn't seem appropriate either, because it would get messy.

Do you think this warrants a feature request?

If so, I was thinking that maybe the .gitignore file could have a flag after
each entry, to indicate whether the file(s)/folder(s) should have this new
feature or not (that way it would cater for everyone, but I can't see why
you wouldn't want this behaviour). 

If you like this idea and submit this as a feature request, please respond
with a link of the official request so that I can follow it, or provide me
with a link to submit it myself.

P.S. Here is a forum post I made on StackOverflow about the issue:
http://stackoverflow.com/questions/13761682/gitignore-hide-ignored-files-dur
ing-checkout

Kind regards,
Matt

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-12-10  9:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-08  0:50 Feature Request - Hide ignored files before checkout Matthew Ciancio
2012-12-08 19:21 ` Chris Rorvick
     [not found]   ` <000001cdd5a0$fd23adf0$f76b09d0$@gmail.com>
2012-12-09  5:54     ` Chris Rorvick
2012-12-09  8:10       ` Matthew Ciancio
2012-12-09  9:04   ` Junio C Hamano
2012-12-09 22:37     ` Matthew Ciancio
2012-12-10  1:46 ` Andrew Ardill
2012-12-10  2:01   ` Matthew Ciancio
2012-12-10  9:47     ` Erik Faye-Lund

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).