Can’t ignore UserInterfaceState.xcuserstate

Can’t ignore UserInterfaceState.xcuserstate

Asked on January 10, 2019 in Git.
Add Comment


  • 4 Answer(s)

    Git is probably before tracking the file.

    From the gitignore docs:  

    By using git rm –cached. you can stop tracking a file in currently tracked.

    Replacing  the project and username :

    git rm --cached [project].xcodeproj/project.xcworkspace/xcuserdata/[username].xcuserdatad/UserInterfaceState.xcuserstate
    git commit -m "Removed file that shouldn't be tracked"
    

    Rather use the –a option to git commit that will add all files to modified or deleted.

    Answered on January 10, 2019.
    Add Comment

    Ignored file keep displaying up in the untracked list, that may use git clean -f -d to clear.

    1. git rm –cached YourProjectFolderName.xcodeproj/project.xcworkspace/xcuserdata/yourUserName.xcuserdatad/UserInterfaceState.xcuserstate
    2. git commit -m “Erase the  file that shouldn’t be tracked”
    3. git clean -f -d

     

    Answered on January 10, 2019.
    Add Comment

    One will remove for every user to work in different Mac (Home and office)

    git rm --cache */UserInterfaceState.xcuserstate
    git commit -m "Never see you again, UserInterfaceState"
    
    Answered on January 10, 2019.
    Add Comment

    Git is probably already tracking the file.

    From the gitignore docs:

    To stop tracking a file that is currently tracked, use git rm –cached.

    Use this, replacing [project] and [username] with your info:

    git rm --cached [project].xcodeproj/project.xcworkspace/xcuserdata/[username].xcuserdatad/UserInterfaceState.xcuserstate
    git commit -m "Removed file that shouldn't be tracked"

    Alternatively you can use the -a option to git commit that will add all files that have been modified or deleted.

    Once you’ve removed the file from git, it will respect your .gitignore.

    Answered on February 20, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.