I need to exclude the folder App_Data from my Github but i don\'t know how.
I have a application which saves many files like jpg files in the directory: Source\\MyProjec
Per https://help.github.com/articles/ignoring-files
From time to time there are files you don't want git to track. There are a few methods of telling git what files to ignore.
If you create a file in your repository named
.gitignore
git will use its rules when looking at files to commit. Note that git will not ignore a file that was already tracked before a rule was added to this file to ignore it. In such a case the file must be un-tracked, usually withgit rm --cached filename
This file can be committed into the repository, thus sharing the rule list with any other users that clone the repository.
It should do exactly what you want. It will exclude files/folders with that string from your local repository path (the path where .gitignore is stored).
Keep in mind, this is not your only option. I'd read the help document linked below for a better understanding to get exactly what you need accomplished.
See here for more info: GitHub Help - Ignoring Files
Simply put this in your .gitignore
file (assuming MyProject is your git root):
App_data
In case you need to ignore a whole folder which was already tracked, do not forget to do it recursively with -r.
Add foldername/ to .gitignore
git rm -r --cached foldername/