Over a million developers have joined DZone.

Ignoring Files in Git

· Java Zone

Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code! Brought to you in partnership with ZeroTurnaround.

Quick tip on setting up files to be ignored for your system.

1. Execute the command setting the location of your system level ignore file

git config --global core.excludesfile ~/.gitignore

2. Edit the Global Git Ignore File: ~/.gitignore

.DS_Store
*.swp
*.iml
*.ipr
*.iws
.classpath
.gitignore
.project
.settings/
.springBeans/
target/
.classpath

3. Peek into your Global Git configuration ~/.gitconfig

[user]
name = Your Name
email = you@yourdomain.com
[color]
ui = auto
[core]
editor = mate
excludesfile = /Users/youruser/.gitignore

Further Reading – for more config options

 

From http://gordondickens.com/wordpress/2010/12/06/ignoring-files-in-git/

The Java Zone is brought to you in partnership with ZeroTurnaround. Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code!

Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}