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

git pull -s subtree doesn't work properly

From
OKOliver Kullmann <o.kullmann@swansea.ac.uk>
Date
Nov 5, 2009, 18:09 UTC
Message-ID
<20091105180905.GP17628@cs-wsok.swansea.ac.uk>
Hello,
using

IntroductionJava> git remote add -f CSM41 /home/kullmann/csoliver/UofT/Java0910/ProgrammingJava/CS-M41_Programs IntroductionJava> git merge -s ours --no-commit CSM41/master IntroductionJava> git read-tree --prefix=Artikel/Skripte/IntroductionJava/CS_M41/ -u CSM41/master IntroductionJava> git commit -m "Einfuegen des CS-M41-Projektes als Verzeichnis CS_M41"

I have imported repository "CS-M41_Programs" into another repository. Later then I replaced in the config-file the old url /home/kullmann/csoliver/UofT/Java0910/ProgrammingJava/CS-M41_Programs by the new one

[remote "CSM41"]
	url = git://github.com/OKullmann/CS-M41-Programming-in-Java.git
	fetch = +refs/heads/*:refs/remotes/CSM41/*
But now
IntroductionJava> git pull -s subtree CSM41 master

doesn't work anymore: In the CSM41 repository just one file index.html was changed, and apparently the merge strategy recognises that the other files haven't been changed, while index.html is placed just as if the relative path would start from the root of the repository.

IntroductionJava> git pull -s subtree CSM41 master
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
From git://github.com/OKullmann/CS-M41-Programming-in-Java
 * branch            master     -> FETCH_HEAD
CONFLICT (delete/modify): Artikel/LaTeX/SystemStile/Html/index.html deleted in HEAD a
nd modified in 38b11a96fa009a5b2c24cfc94c0268ab9ca7ce39. Version 38b11a96fa009a5b2c24
cfc94c0268ab9ca7ce39 of Artikel/LaTeX/SystemStile/Html/index.html left in tree.
Automatic merge failed; fix conflicts and then commit the result.

IntroductionJava> git status # On branch master # Unmerged paths: # (use "git reset HEAD <file>..." to unstage) # (use "git add <file>..." to mark resolution) # # deleted by us: ../../LaTeX/SystemStile/Html/index.html # no changes added to commit (use "git add" and/or "git commit -a")

The path of index.html is Artikel/Skripte/IntroductionJava/CS_M41/Html/index.html. Why git thinks that index.html should be placed into another directory Artikel/LaTeX/SystemStile/Html/ I have no clue (this directory doesn't exist).

Is it possible to tell "git pull" where the subtree really is, or is that not really the cause of the problem?

Thanks for your consideration!
Oliver
Next: Oliver Kullmann
Message 1 of 4 in “git pull -s subtree doesn't work properly”
  1. Oliver KullmannNov 5, 2009
  2. Oliver KullmannDec 31, 2009
  3. Oliver KullmannDec 31, 2009
  4. Nanako ShiraishiJan 1, 2010

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.