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

[BUG] unable to checkout branch with a clean worktree

From
AMAnders Melchiorsen <mail@cup.kalibalik.dk>
Date
Jan 5, 2009, 15:42 UTC
Message-ID
<35079.bFoQE3daRhY=.1231170168.squirrel@webmail.hotelhot.dk>

Git v1.6.1: The final checkout fails with an error about merge conflicts. However, the worktree is clean, and I am not trying to do a merge.

Is this a known issue? If so, what is the particular issue that we should avoid?

Regards, Anders.

cd $(mktemp -d repo.XXXXXX) git init

echo init >start git add start git commit -m A

git branch parallel

mkdir a b echo x >a/one echo y >a/two echo z >b/three git add . git commit -m B

git checkout parallel mkdir -p a/one a/two b echo xx >a/one/cat echo yy >a/two/cow echo zz >b/unrelated git add . git commit -m C

# This fails: git checkout master

Next: Clemens Buchacher
Message 1 of 3 in “[BUG] unable to checkout branch with a clean worktree”
  1. Anders MelchiorsenJan 5, 2009
  2. Clemens BuchacherJan 5, 2009
  3. Anders MelchiorsenJan 5, 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.