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

Re: git refuses to switch to older branches

From
Martin Waitz <tali@admingilde.org>
Date
Aug 20, 2006, 18:15 UTC
Message-ID
<20060820181511.GH30022@admingilde.org>
In-Reply-To
<Pine.LNX.4.63.0608201447470.28360@wbgn013.biozentrum.uni-wuerzburg.de>
hoi :)
On Sun, Aug 20, 2006 at 02:48:34PM +0200, Johannes Schindelin wrote:
Show 19 quoted lines
> On Sun, 20 Aug 2006, Martin Waitz wrote:
> > On Sun, Aug 20, 2006 at 12:44:57AM +0200, Petr Baudis wrote:
> > > Dear diary, on Sun, Aug 20, 2006 at 12:39:20AM CEST, I got a letter
> > > where Junio C Hamano <junkio@cox.net> said that...
> > > > But I would suggest you to be _extremely_ careful if you want to
> > > > try this.  I do not have an example offhand, but I would not be
> > > > surprised at all if there is a valid use case where it is useful
> > > > to have a pattern that matches a tracked file in .gitignore
> > > > file.
> > > 
> > >   *.o and binary blobs of closed-source software.
> > 
> > but if you want to switch from one branch which has the .o file
> > built from source to another branch which has the .o file tracked
> > in binary form, wouldn't you want to remove the generated file
> > in order to store the tracked one from the new branch?
> 
> Not necessarily. Sometimes you have files in your working directory, which 
> are not in your repository, you know?

Sure. But we are only talking about files which are explicitly ignored in one branch and are tracked in another branch.

Perhaps it makes sense to check that the file is _not_ ignored in the other branch (in which it is tracked). Would such a check make everybody happy?

Is there an easy way to check if some file is marked as ignored in an other branch?

-- 
Martin Waitz
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 10 of 15 in “git refuses to switch to older branches”
  1. Martin WaitzAug 19, 2006
  2. Jakub NarebskiAug 19, 2006
  3. Junio C HamanoAug 19, 2006
  4. Jakub NarebskiAug 19, 2006
  5. Junio C HamanoAug 20, 2006
  6. Junio C HamanoAug 19, 2006
  7. Petr BaudisAug 19, 2006
  8. Martin WaitzAug 20, 2006
  9. Johannes SchindelinAug 20, 2006
  10. Martin WaitzAug 20, 2006
  11. Johannes SchindelinAug 20, 2006
  12. Josef WeidendorferAug 20, 2006
  13. Alex RiesenAug 20, 2006
  14. Martin WaitzAug 20, 2006
  15. Alex RiesenSep 8, 2006

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.