How can I move files & folders using git in Xcode 4?
I’m familiar with the differences between groups and actual directories in Xcode. I always create an actual folder in finder and drag it into the project, ensuring ‘copy’ is un-checked.
When I move folders, I delete the items by reference only, move them in finder, then re-add them.
Now I’m using git for the first time, and discovered in my testing that if I remove a directory using the method described above, I can’t do a commit. Xcode tells me it can’t switch to the directory because ‘no such file or directory.’ From what I’ve found online, git isn’t notified of the directory changes when done in Xcode.
How can I move files & folders using git in Xcode 4 and have the compiler and git be aware of the moves so I can commit?
2 Solutions Collect From Internet About “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:
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.
- Append NSInteger to NSMutableData
- How to convert surrogate pair to Unicode scalar in Swift
- Sort NSArray of custom objects based on sorting of another NSArray of strings
- Core Data: delete all objects of an entity type, ie clear a table
- How to catch special indicated **characters** in an NSString and bold what's in between?
- Can I write an iPhone application in any language other than Objective-C?
- How to debug app in compatibility mode on iOS 7?
- image for nav bar button item swift
- How can I get the memory address of a value type or a custom struct in Swift?
- Reduce pdf size – Objective c
- Hiding the table view cells with switch ON/OFF in iPhone
- How to center horizontally UICollectionView Cells?
- Realm object as member is nil after saving
- How to match precompiled static library's debugging symbols to source code with Xcode 5?
- How to display the iPhone/iPad keyboard over a full screen OpenGL ES app