简体   繁体   中英

xcode project name and directory change/ Git cannot see old revisions

I am in Git madness right now!

I changed the name of my xcode project by clicking on the project name in xcode and changing the name from oldproject to newproject.

That changed the name of the project everywhere except for the folder (in finder) containing the project files. My OCD kicked in and I changed the directory name where the project files reside. I then had to manually point xcode to the location of the project files (by selecting the project in xcode, opening the utilities window and updating the "Full Path"). The app still works fine.

Now comes the Git part. I checked git status in Terminal and it said that I needed to add the directory newprojectdirectory/. I did and then did a commit. And now I can do commit and use Git as normal going forward but I can't see any of the oldprojectdirectory/ revisions.

Any thoughts? Thanks

If you want to track history beyond rename, it's normal. git doesn't track history of renamed file like other files. it is just like 'remove & add newly'

but, you can use --follow option

git log --follow rename-file

and you can see history beyond rename, however it works only for a file.

使用:

   git mv -f [file-original] [file-renamed]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM