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

Re: Feature Request - Hide ignored files before checkout

From
Chris Rorvick <chris@rorvick.com>
Date
Dec 9, 2012, 05:54 UTC
Message-ID
<CAEUsAPaqSQVSNaiJUO3Sfms3Rt2vzsciczXK0impHnXQ52u7mA@mail.gmail.com>
In-Reply-To
<000001cdd5a0$fd23adf0$f76b09d0$@gmail.com>

On Sat, Dec 8, 2012 at 6:06 PM, Matthew Ciancio <matthew.ciancio16@gmail.com> wrote:

Show 31 quoted lines
> Hi Chris,
>
> Yes, I don't think I have explained myself well enough.
>
> When I say "disappear" I do not mean "get deleted", I mean: go out of view
> just like foo.txt does, as it is committed to branchB and not merged into
> branchA.
>
> So I am saying that I think .gitignored files should behave partly like
> committed and un-merged files, in the sense that they disappear when
> checking out to a different branch.
> I don't want to commit these files (which would give me the behaviour I
> want), because they are binary/OS specific and really do not belong in the
> repository, BUT I need them to run/build certain committed files.
>
> To be concrete: I want ignore.txt to be ignored in branchB and hence
> disappear (in the same way that foo.txt will), when checking out to branchA.
> When I checkout back to branchB I want ignore.txt to reappear (in the same
> way that foo.txt will).
>
> I understand why this behaviour is not happening (because my .gitignore
> files are different between the branches), but I am saying that I would like
> to have the option to keep my .gitignore'd files local to the branch they
> are in.
>
> E.g. I currently have a branch with all these binary files that are required
> to run an application on my OS, but when I checkout to another branch I do
> not need or want those binary files anymore (at least not until I checkout
> back into the branch I just came from).
>
> Please tell me if that still doesn't make sense.
Hi Matthew,
Cc'ing the list to benefit from the review of others.

Not wanting the files in the repository seems to be in conflict with the desire to have them under its control (i.e., disappear/reappear behavior.) I understand not wanting to commit dependencies, but why do you need them to disappear? Why not just put them somewhere where they can be used when needed and left alone when not?

If you do want this behavior, it seems like you should just commit the files on the respective branch. Maybe someone else will have a better idea, though.

Chris
Previous: Erik Faye-LundNext: Matthew Ciancio
Message 8 of 9 in “Feature Request - Hide ignored files before checkout”
  1. Matthew CiancioDec 8, 2012
  2. Chris RorvickDec 8, 2012
  3. Junio C HamanoDec 9, 2012
  4. Matthew CiancioDec 9, 2012
  5. Andrew ArdillDec 10, 2012
  6. Matthew CiancioDec 10, 2012
  7. Erik Faye-LundDec 10, 2012
  8. Chris RorvickDec 9, 2012
  9. Matthew CiancioDec 9, 2012

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.