Top "Gitignore" questions

.gitignore is a file that lists files, directories, and/or path patterns that Git should not include as part of a repository.

When would you use .git/info/exclude instead of .gitignore to exclude files?

I am a bit confused about the pros and cons of using .git/info/exclude and .gitignore to exclude files. …

git gitignore
Should bower_components be gitignored?

Would it be good practice to keep only the bower.json file and gitignore the whole bower_components directory?

git gitignore bower
Exclude specific files from 'git pull'

I have a production git repo that I only pull changes from the main repo into; I never change this …

git gitignore pull
.gitignore NuGet exclude packages/ include packages/repositories.config

I'm trying to create a .gitignore for a Visual Studio project that uses NuGet. It currently contains: \packages/* !packages/repositories.…

git nuget gitignore
How do negated patterns work in .gitignore?

I am attempting to use a .gitignore file with negated patterns (lines starting with !), but it's not working the way …

git gitignore
How to track directories but not their files with Git?

I've recently started using Git and am having trouble with just one thing. How can I track directories without tracking …

git directory gitignore
Cordova 5.0.0: Which files should I commit to git?

I use Cordova 5.0.0 and i have the following project structure: MyProject - hooks - platforms - plugins - resources - …

cordova gitignore
How to ignore files which are in repository?

I have a file (config.php), that is already commited to Git repository, but I want to ignore locally, i.…

git gitignore git-rm
Whitelisting and subdirectories in Git

I have created a white-list for text files only. * !*.txt Now, I have an untracked text file in a sub-directory …

git gitignore
Git Ignore everything in a directory except subfolders

This is my folder structure: data/ .gitignore uploads/ .gitignore I would like to commit the folders but not the files …

git gitignore subdirectory