How can I move files & folders using git in Xcode 4? How can I move files & folders using git in Xcode 4? git git

How can I move files & folders using git in Xcode 4?


You shall not move files in a GIT repository using the Finder. You'd better use the move command from shell.

You then have to manually redresh links in XCode (or remove/add files again).

Moving a file is similar to the unix 'mv' command, with the 'git prefix:

git mv path destination

(use -f to override destination... with caution)


After you have made all your changes in the Finder, open a terminal window and navigate to your project's directory:

cd path/to/project

then run this command:

git add --all

This command will stage all of the changes and Xcode should be able to resume its management of the repository from here.