Duplicate git repositories In Xcode.


Alex Zavatone
 

Has anyone seen this?  On one of my Macs when I clone a fresh copy of our project and press command 2 there are two copies of the repo, but one of them shows different local branches.

No other Mac that I clone to from the Terminal shows this and the following commands entered into the terminal show the same results.

git remote -v
git branch -a

But in Xcode and only on one Mac Xcode thinks the branch is connected to two copies of the remote repo.

Normal

 

My problem Mac

 

And when I open each, the clone that I just cloned is on the top and some other is on the bottom. 

 

Does anyone know where in the Xcode project folder the setting for the remote might be stored?  The .xcodeproj? Somewhere in the .git folder?


Thanks in advance.

Alex Zavatone



Alex Zavatone
 

Just in case this ever happens to you, open the inspector panel and see where both of the working copies are on disk.  

For some strange reason, whenever I cloned a copy of our repo, Xcode would find and decide it needed to link to another working copy in another folder on disk.  

No matter which git files, Xcode config files, whatever I searched, I could not find why this was happening.  

The solution?  Rename the path to the folder of the working copy in the Finder and the problem goes away.

Why this works?  I have no idea.  

Sometimes Xcode astounds me in the most confounding ways.  

Cheers,
Alex Zavatone

On Aug 21, 2019, at 1:37 PM, Alex Zavatone via Groups.Io <zav@...> wrote:

Has anyone seen this?  On one of my Macs when I clone a fresh copy of our project and press command 2 there are two copies of the repo, but one of them shows different local branches.

No other Mac that I clone to from the Terminal shows this and the following commands entered into the terminal show the same results.

git remote -v
git branch -a

But in Xcode and only on one Mac Xcode thinks the branch is connected to two copies of the remote repo.

Normal
<image001.png>

 

My problem Mac
<image002.png>

 

And when I open each, the clone that I just cloned is on the top and some other is on the bottom. 

<image003.png>

 

Does anyone know where in the Xcode project folder the setting for the remote might be stored?  The .xcodeproj? Somewhere in the .git folder?

Thanks in advance.
Alex Zavatone