Git – How to ignore file extension

Standard

Alot of times in a visual studio project you will want to ignore binary files types, such as .sln and .suo to make merging easier. This is how you do this:

touch .gitignore

git add .gitignore

git commit -m “added gitignore file”

Now you must edit the .gitignore file add the file extensions you want excluded

*.sln

*.suo

To stop tracking a file that is currently tracked, use git rm –cached.

Advertisements

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