I have created a white-list for text files only. * !*.txt Now, I have an untracked text file in a sub-directory – sub/dir/file.txt, and this is NOT shown (it is ignored). Text files in the root directory are shown, however. Why is that, and how do I fix it?
Every developer on my team has their own local configuration. That configuration information is stored in a file called devtargets.rb which is used in our rake build tasks. I don’t want developers to clobber each other’s devtargets file, though. My first thought was to put that file in the .gitignore list so that it is […]
There is a file that was being tracked at one time by git, but now the file is on the .gitignore list. However, that file keeps showing up in git status after it’s edited. How do you force git to completely forget about it?
Is there any way to see why some file is getting ignored by git (i.e. which rule in a .gitignore file is causing the file to be ignored)? Imagine I have this (or a much more complex scenario, with hundreds of folders and tens of .gitignore files: / -.gitignore -folder/ -.gitignore -subfolder/ -.gitignore -file.txt If […]
I have a directory structure like this: .git/ .gitignore main/ … tools/ … … Inside main and tools, and any other directory, at any level, there can be a ‘bin’ directory, which I want to ignore (and I want to ignore everything under it too). I’ve tried each of these patterns in .gitignore but none […]
My .gitignore file seems to be being ignored by git – could the .gitignore file be corrupt? Which file format, locale or culture does git expect? My .gitignore: #this is a comment debug.log nbproject/ Output from git status: # On branch master # Your branch is ahead of ‘origin/master’ by 1 commit. # # Untracked […]
What is the proper syntax for the .gitignore file to ignore files in a directory? Would it be config/databases.yml cache/* log/* data/sql/* lib/filter/base/* lib/form/base/* lib/model/map/* lib/model/om/* or /config/databases.yml /cache/* /log/* /data/sql/* /lib/filter/base/* /lib/form/base/* /lib/model/map/* /lib/model/om/* ?
Can I ignore files locally without polluting the global git config for everyone else? I have untracked files that are spam in my git status but I don’t want to commit git config changes for every single little random untracked file I have in my local branches.
Which files should I include in .gitignore when using Git in conjunction with Visual Studio Solutions (.sln) and Projects?
I have a git repository hosted on Github. After committing many files, I am realizing that I need to create .gitignore and exclude .exe, .obj files. However, will it automatically remove these committed files from the repository. Is there any way to force that?