1

There are some files (like the break points list file -xcbkptlist) that keep on emerging when i commit my code to a branch in Xcode source control. I have tried to use git ignore in the following way:

I've Opened up TextEdit and add the following:

build/*
.DS_Store
*.xcuserdatad
*.xcbkptlist

I Saved the file in the root directory of my project and named it .gitignore but the files still emerged.

3 Answers 3

1

All i needed to do make it work:

  1. Add the git ignore file to the project tree.
  2. Remove the file that i don't want to be committed, commit , and add the
    file again.( those files you ignore are still being tracked)

Another way is to remove them from git manually using:

    git rm --cached <files>         
Sign up to request clarification or add additional context in comments.

Comments

0

If you want an easy way to ignore files, you can also use http://www.gitignore.io which helps create useful .gitignore files for your project.

Here is the emacs template: https://www.gitignore.io/api/osx,xcode

There is also documentation demonstrating how to run gi from the command line.

Comments

0

Xcode is extra awful when it comes to source control. Every single thing you do is saved in the workspace folder so that when you log back in, its in the exact same state you left it.

If you are extra lazy (like me) you can add a global gitignore and never have to think about this again.

I still recommend using a repo-specific gitignore simply so that other people don't introduce crap into your repository, or god forbid someone overwrites your xcode theme/keybinds/etc...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.