Wednesday, August 3, 2011

Global ignorefile for Git and SVN

Some years ago I started using SVN. I really liked it, because of the whole history and collaboration thing. But once I tried Git, I knew that I didn't want to use SVN anymore ;)
Maybe there are other reasons why to love Git (don't hesitate in telling me via comments), but what I really love is the part "distributed" in it's description. It's much more comfortable to commit to the local repository and later push it to a remote one, than having to commit it directly to a remote repository.

Now what you always need when using a version control system – whatever product you use – is a way to ignore files. I came across this problem after starting a new project some days ago (yes, a new project I'll soon announce). Using command line tools is fine but when using version control, I prefer a GUI, so I installed the Eclipse EGit plugin and wanted to make my first commit. But wait: MacOS X has the quirk to create .DS_Store files and Git wanted to add them. Of course that's not what I wanted, so I decided to add it to the .gitignore-file.
But then I remembered that I'll probably start other projects where I don't want to track those files.
Now everybody who uses Git knows, that there is one place for Git: GitHub or more specifically Help.GitHub.
There I found out, that when they developed Git they already know about my problem and implemented it: with Git it's possible to create a global .gitignore to get rid of those annoying .DS_Store-files!

Before writing this blog entry, I didn't know if this is possible with SVN because for some reason I never had this problem with SVN or at least didn't think about it. After a little research, I found out that you can add ignore-patterns to the global SVN config too. Read the SVN book and find out how.

Labels: , , , , , ,


Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home