- From: James Graham <james@hoppipolla.co.uk>
- Date: Wed, 01 Apr 2015 09:30:35 +0100
- To: "Li, HaoX" <haox.li@intel.com>
- CC: "public-test-infra@w3.org" <public-test-infra@w3.org>
On 01/04/15 05:18, Li, HaoX wrote: > Hi, > > > > From last week, we all meet an issue when fetch code for > w3c/web-platform-tests to our old forked repository: > > > > $ git fetch upstream > > $ git merge upstream/master > > Updating cdd6c0f..ffeb316 > > error: Updating the following directories would lose untracked files in it: > > tools > > Aborting > > > > But this issue is not met in new forked repository, I notice that we > have changed the tools as a sub module. > > Don’t I get correct way to fetch the changes, or is it an issue occurs > by the changes? Unfortunately git seems to be pretty poor at changing an existing directory into a submodule, especially when that involves removing some other submodules. The simplest solution seems to be to remove all the files related to the submodules (i.e. do the opposite of git submodule init). The submodule git repositories are in .git/modules/ these may safely be deleted. Then thw working copy files need to be deleted; these are the files in tools/ and resources/. After you remove these existing files (backing up any chnages as needed) you can run git submodule update --init --resursive to fetch the up-to-date copy of the files. I hope that helps and sorry for the inconvenience. James
Received on Wednesday, 1 April 2015 08:31:01 UTC