My project disappeared when I renamed it in git
I was putting the finishing touches on a project. One of those “finishing touches” was renaming the project. Now it’s “gone”. ??. I looked on GitHub and it’s still “there”, but I’m in over my head in terms of how to get my
master and my renamed branch to interact properly. Here’s how I got to this dreadful state:
I followed Apple’s How to Rename a Project post:
- Bash script for defining flags depending on current git branch
- Can't add xCode 4.2 project to repository (and get it working)
- Xcode + GitHub. What is the proper setup
- Xcode .git ignore
- How to update code when emulating Cordova app on Xcode?
- Can't commit because someone else pushed, can't pull without discarding my changes in git
In git, from the command line, I checked out a branch to rename the project as follows:
git checkout -b rename-project
When I was done, I typed:
git add . git commit -m "Renamed my project"
Then, I went back to the master to merge the ‘rename-project` branch as follows:
git checkout master
Project /Users/me/Documents/Developer/My Renamed Project.xcodeproj cannot be opened because it is missing its project.pbxproj file.
How do I get my 2 weeks’ work back?
One Solution collect form web for “My project disappeared when I renamed it in git”
master doesn’t have your renamed project yet. Close XCode, then do
git merge rename-project
and if that succeeds, you can reopen XCode.