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

Re: "Your local changes ... would be overwritten" bug

From
Clemens Buchacher <drizzd@aon.at>
Date
Sep 6, 2011, 07:34 UTC
Message-ID
<20110906073436.GA28490@ecki>
In-Reply-To
<8362l73qi6.fsf@kalahari.s2.org>
Hi,
On Mon, Sep 05, 2011 at 07:25:53PM +0300, Hannu Koivisto wrote:
Show 10 quoted lines
> 
> I have a problem where "git checkout origin/another-branch" in master
> should remove a set of files but instead I get:
> 
> error: Your local changes to the following files would be overwritten by checkout:
>         file1
>         file2
>         ...
> Please, commit your changes or stash them before you can switch branches.
> Aborting

Could you set a breakpoint in add_rejected_path and send us the backtrace? Like this:

$ gdb --args git checkout origin/another-branch
>> break add_rejected_path
>> r
... wait for break ...
>> bt

Thanks, Clemens

Previous: Andrew ArdillNext: Hannu Koivisto
Message 5 of 6 in “"Your local changes ... would be overwritten" bug”
  1. Hannu KoivistoSep 5, 2011
  2. Matthieu MoySep 5, 2011
  3. Vijay LakshminarayananSep 5, 2011
  4. Andrew ArdillSep 5, 2011
  5. Clemens BuchacherSep 6, 2011
  6. Hannu KoivistoSep 6, 2011

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.