Git Tips, Tricks and Questions #2

I’m wondering about what i suppose would be a best practice for when to commit .gitignore. I use Rails and my .gitignore is generated with my app and I usually add a couple of dev environment specific lines…. nothing unusual. However I can’t find anything anywhere on when I should commit .gitignore.

It makes sense to me to commit .gitignore before adding/committing any other files; Setting up the ignore file, then committing everything and deleting certain ignore files/folders just doesn’t seem very DRY.

Advertisements

About distinctinteractive

I graduated 3 years ago from the University of Huddersfield with a 2:1 BA in Interactive Multimedia. After leaving University i worked for a small company in Huddersfield (Offroad Code) mainly helping to maintain a large travel company website. I am currently freelancing as Distinct Interactive. Follow me on Twitter @jimmckerchar
This entry was posted in Git, Random Stuff and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s