0

I have a virtual-box with installed Ubuntu on it. All new projects I start working on have some weird .AppleDouble files. So every time I check my git status they are appear in the log, unless I include them in .gitignore.

Could someone please advise me how to get rid of them. So that they won't appear in future projects and I don't have to include them in .gitignore every time.

These files don't appear on my OS X (i.e. non virtual machine). I am guessing it has something to do with virtual box.

Said Kholov
  • 2,436
  • 1
  • 15
  • 22
  • 1
    You can utilize a global `.gitignore` file with Git http://stackoverflow.com/questions/7335420/global-git-ignore – Danny Kopping May 06 '15 at 21:48
  • good idea. I thought someone could explain why this is happening. And is there a "right" way of removing these files. (some virtualbox or ubuntu config). Upvoting this answer anyway, good solution – Said Kholov May 06 '15 at 21:50

1 Answers1

2

You can configure a global ignore file, where you can add that file pattern. This is then ignored in all git repositories on your machine. To configure the global file, create that ignore file somewhere (i usually have it in my home folder) and execute the following command to configure it:

git config --global core.excludesfile /path/to/your/file
dunni
  • 43,386
  • 10
  • 104
  • 99
  • Nice answer. If there is no way of doing this in ubuntu or virtualbox configuration, I will accept your answer. Upvote for now. Thanks – Said Kholov May 06 '15 at 21:53
  • Do you share the storage of the virtualbox with your Mac host? AppleDouble files are, as the name says, Mac specific files, so the only way they would be created is, when you share the same storage with a Mac and a non-Mac system. On Mac you don't see them because they are hidden. – dunni May 07 '15 at 05:28
  • Yep. They are hidden on ubuntu as well. But they appear in my in my git status, and this is annoying – Said Kholov May 07 '15 at 05:54
  • Well, if you share the storage with Mac, then i see no easy solution, other than using the global gitignore. I don't think you can disable the creation of that file in Mac. – dunni May 07 '15 at 09:51