jmbejara / comp-econ-sp18

Main Course Repository for Computational Methods in Economics (Econ 21410, Spring 2018)
16 stars 23 forks source link

Gitignore #29

Closed bariscangoc closed 6 years ago

bariscangoc commented 6 years ago

Hi,

Are we suppose to use gitignore for all the datasets? Is adding .gitignore to the end of file name sufficient to ignore the file?

Thanks!

jmbejara commented 6 years ago

I recommend not including the data sets. You can include them if you want to. If you choose to include them, I would recommend that you make sure that you only are including the bare minimum needed to make the code run.

You can set .gitignore to ignore the files with certain extensions by adding the following lines to the .gitignore file at the root directory of your repository:

*.csv
*.zip
*.xls

You can check out my gitignore file here: https://github.com/jmbejara/comp-econ-sp18/blob/master/.gitignore

If you have already added the datasets to the Git staging area or have even commited the data sets, then you need to tell Git to both ignore the datasets and to stop tracking them. Once Git has started tracking a file, it won't stop tracking it---even if the gitignore file says that it shouldn't.

bariscangoc commented 6 years ago

Thanks for the response! How can I stop Git from tracking the files?

jmbejara commented 6 years ago

You should be able to right-click in GitKraken and there will be an option to "ignore". When you do this, it will ask you if you want to ignore or "ignore and stop tracking."