0

I have a bunch of images in my Xcode 4 project that I would like to rename and/or remove. I am using Git as my version control. If there is an image file, say, called myImage.png which is defined as an Image View in one of my view controllers that I want to rename to myImage2.png, can I simply click on the name of the image file in the Xcode Project Navigator to rename it? If so:

a) will the actual image file be renamed automatically in the Finder?

b) will the name reference in the Image View be updated automatically?

c) most importantly, will Git be smart enough to know that I have renamed the file and mark the renamed file "M" and be ready for my next commit, i.e. it's equivalent to "git mv myImage.png myImage2.png"?

Similarly, is it possible to delete a file defined in the xcode project by right clicking on the file in the Xcode Project Navigator and select Delete? Would it be equivalent to "git rm foo.png"?

My development partner is more of a graphic person and is not savvy with command line interface like Terminal.app. I would like to know if he needs to rename/delete certain image files whether he can do so directly in xcode without breaking the integrity of the git repo unintentionally.

1615903
  • 32,635
  • 12
  • 70
  • 99
Kenny
  • 429
  • 6
  • 22
  • 1
    See this [question](http://stackoverflow.com/questions/2641146/handling-file-renames-in-git?rq=1) – Lithu T.V Jun 19 '13 at 07:17
  • 2
    In a word "Yes". You could have tried it in the time it took to type in this question. – trojanfoe Jun 19 '13 at 07:18
  • @trojanfoe, true, except for part 'b', the name of the image in any code won't be updated automatically. – Wain Jun 19 '13 at 07:25
  • @trojanfoe, you could have been correct but my development system is out for service so I have no access to try it. And as I said my partner is not computer savvy and he is working at a different location so didn't want him to try it himself without some form of confirmation from the community. Please be more considerate next time before you make a comment like that. I didn't think I need to explain in glory details about the working situation to get this question answered... – Kenny Jun 19 '13 at 16:47
  • @trojanfoe, but thanks for your response anyway. One thing still not clear to me is that are you implying that for question c, my partner does not have to execute the git mv command in the Terminal, and that this operation will be performed behind the scene? – Kenny Jun 19 '13 at 16:56
  • We just ran into the same situation. If you change the name in xcode, git removes the old file and adds the renamed file, therefore the rename DOES NOT behave like "git mv". – Lisa Aug 24 '13 at 16:21

0 Answers0