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:

  • gitignore new file content not working
  • What to do with unused feature branches
  • How to specify an ssh key for the jenkins git plugin
  • Git always bundles annotated tags
  • Git stash: “Cannot apply to a dirty working tree, please stage your changes”
  • IDEA IntelliJ git clone
  • 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?

  • How to tell the results of git commit before git push?
  • Cache http git passwords in windows: mysysgit
  • Does m2eclipse need EGit for git support
  • Utility of staging unmodified files using Git?
  • Git: How to revert a symlink commit which replaced a submodule?
  • Possible to merge wear and mobile Git repositories
  • 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.

    Git Baby is a git and github fan, let's start git clone.