On Friday, October 19, 2012 3:44:54 PM UTC+2, João Moreno wrote:
> Hey,
> Is there any way to defined rule based ignore rules like the such: "ignore 
> *.js if there is a *.ts file in the same directory, and with the same 
> basename"?
> For example, in a CoffeeScript project one can have compiler generated 
> JavaScript files as well as manually written JavaScript files:
> banana.coffee
> banana.js
> apple.js
> Is there a way to have git automatically ignore banana.js?
> Is this a feature worth pushing forward for?

Keeping your generated sources together with your hand-written sources 
sounds messy. 

I'd think that your feature would be confusing and intrusive for the 
participants of such a project. If they wanted to clean up old generated 
javascript files, they'd have to do complicated rm -rf *.js commands under 
certain directories.

Most projects designate a 'target' or 'build' directory where generated 
resources are output (together with minified JS, compiled resources, 
packaged artifacts, etc). This is a very practical convention as it is (a) 
easily recognizable for team members, (b) straight forward to remove when 
doing some local cleanup, and (c) easy to ignore in .gitignore.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to