xcodegitbookmarks

How to add bookmarks to git in Xcode?


I organized my project todos into bookmark folders and it's a very nice feature, but the problem is that the bookmarks do not appear on git to be staged and committed... I tried the ChatGPT for it and it gave me this address to add to the git ignore file: MyProject.xcodeproj/xcuserdata/YourUsername.xcuserdatad/Bookmarks.xcbm

but this address does not exist, also I searched the "Bookmarks.xcbm" on finder but had no luck finding it.

My questions are:

  1. is it a good idea to share the bookmarks with the developers?

  2. how and could I accomplish this?


Solution

  • The information you got from ChatGPT is basically correct. Bookmarks are contained in a file:

    YourProject.xcodeproj/
        project.xcworkspace/
            xcuserdata/
                yourUserName.xcuserdatad/
                    Bookmarks/
                        bookmarks.plist
    

    This is user level data. Your .gitignore file has already excluded user data from being shared via Git, and you would not want to change that, as you do not want to impose your user data on others. You could copy the plist file and email it to your co-workers if you like, of course, and leave it up to them what to do with it.

    If you feel that bookmarks, like breakpoints, should have the ability to be promoted to project level to make them sharable among different users working on the same project, you should submit a request to Apple.