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

new file missing after resolving rebase merge conflict

From
BHBenny Halevy <bhalevy@panasas.com>
Date
Aug 24, 2008, 17:20 UTC
Message-ID
<48B19872.9070707@panasas.com>
with git version 1.6.0

When rebasing a branch onto another (command was git rebase --onto newbase newbase.orig branch) I've hit a merge conflict in one of the patches that among other things, adds some new files to the tree. After resolving the conflict and running git add on the resolved files I ran git rebase --continue and in a later patch, when trying to compile I noticed that one of the files that the former patch was supposed to add is missing from the tree and from the index.

I'm not sure it's relevant, yet this file is the last hunk in the patch.

Anyhow, the file still appears with git show of the rebased patch:

$ git show 39fe203 ...

diff --git a/include/linux/pnfs_xdr.h b/include/linux/pnfs_xdr.h
new file mode 100644
index 0000000..1f811c5
--- /dev/null
+++ b/include/linux/pnfs_xdr.h
@@ -0,0 +1,137 @@

but it doesn't appear to exist in the index:

$ git checkout include/linux/pnfs_xdr.h
error: pathspec 'include/linux/pnfs_xdr.h' did not match any file(s) known to git.

only after explicitly re-checking it out from the former patch:
$ git checkout 39fe203 -- include/linux/pnfs_xdr.h

it comes to existence.

Benny
Message 1 of 1 in “new file missing after resolving rebase merge conflict”
  1. Benny HalevyAug 24, 2008

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.