Git and different targets


I have created a project called "Drop" that used to have only one target called "Drop". This target is in a git repository. I have created a new target "DropTest" for unit tests (using Google Test). Therefore, my directory structure is:

Drop (parent)
|-- .idea
|-- Drop.xcodeproj
|-- Drop
    |-- .git
    |-- ...
|-- DropTest

I would like to "move" the git repository so that the .git folder is in the Drop (parent) folder and so I can put the Drop and DropTest targets in the same repository.

How can I do that?

Best regards,

Hi Francois.

There are two possibilities for doing that:

1. If you don’t have important commit history in the Drop, you can delete git repository and recreate it in the right place. You can create new repo via VCS | Enable version control integration - Git

2. You can use git filter-branch command to rewrite commit history:
Please find out more information about this command before you’ll use it.

Some example you could find here:

Thanks for the info.


Please sign in to leave a comment.