4

I want to migrate from Eclipse to Android Studio. The import works fine, but the file structure is different after import. I followed the steps in this thread, and copied the .git directory in the root of the newly imported Android-Studio project. But git does not seem to recognize my "moved" source files but lists them as deleted and also as new files.

Old structure:

MyApp
|--src
    |--com.myapp

New structure:

NewApp
|--_myApp
    |--src
       |--main
          |--java
             |--com.myapp

Is there any I can tell git to find my files without manually doing it?

Community
  • 1
  • 1
KCD
  • 678
  • 5
  • 20

1 Answers1

2

Thank you, Sebastien Dawans, this was indeed the missing link. After adding with git add -u, git recognized some of my files as renamed. I wonder why not all files. Android Studio seems to touch some files while importing, which causes git to have problems identifying them. So I copied the com.myapp folder containing the java files from my eclipse folders to Android Studio folder replacing the imported files. Same with the res directory. Than git add . and git add -u

That seems to fix the issue.

KCD
  • 678
  • 5
  • 20
  • I needed first to use git mv on my original repository in order to update the folders hierarchy commit, and then copied the .git to the migration folder and all worked. – Elhanan Mishraky Jan 12 '15 at 14:09