Using Xcode, Git and Arduino

I am wondering if I can use the Xcode with Git to manage an Arduino Library project (h and CPP files). I have tried setting up some simple Empty and External Build projects but have run into some brick walls.

When I add a CPP file it is nowhere to be seen in finder. I need to be able to identify where it resides so it can be in the correct place for the Arduino IDE.

So I try and add references to files created in the Arduino IDE and although they appear in the project pane, edits in Xcode are not reflected in these files (if I use a workspace they are btw). They also are never tagged with Git badges and disappear when I close the project.

Any help would be appreciated,

Using Xcode, Git and Arduino
 
 
Q