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

Re: Tracking the untracked

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 6, 2009, 09:36 UTC
Message-ID
<alpine.DEB.1.00.0905061130340.14230@intel-tinevez-2-302>
In-Reply-To
<93c3eada0905051819l92dc7ey331d69f009cc9c8b@mail.gmail.com>
Hi,
On Wed, 6 May 2009, Geoff Russell wrote:
Show 9 quoted lines
> Bug or feature? I don't know.
> 
> On the master branch I have some untracked files e.g., object modules,
> executables.
> 
> I create a branch B1 and add+commit the untracked files.
> 
> When I switch back to the master (git checkout master), the untracked
> files are no longer where I left them.

This is exactly what Git is supposed to do. You were on branch B1, which has the files tracked, and you do not have the files tracked in master, so when switching to master, they should be removed.

Probably you have to rethink what you are trying to do.

Ciao, Dscho

Previous: Geoff RussellNext: Thomas Rast
Message 2 of 7 in “Tracking the untracked”
  1. Geoff RussellMay 6, 2009
  2. Johannes SchindelinMay 6, 2009
  3. Thomas RastMay 6, 2009
  4. Geoff RussellMay 7, 2009
  5. Jakub NarebskiMay 7, 2009
  6. Thomas RastMay 7, 2009
  7. Geoff RussellMay 7, 2009

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.