How can I Git ignore subfolders / subdirectories?
Use wildcards: Solution/*/bin/Debug Solution/*/bin/Release With version 1.8.2 of Git, you can also use the ** wildcard to match any level of subdirectories: **/bin/Debug/ **/bin/Release/
Use wildcards: Solution/*/bin/Debug Solution/*/bin/Release With version 1.8.2 of Git, you can also use the ** wildcard to match any level of subdirectories: **/bin/Debug/ **/bin/Release/
git ls-files –deleted -z | git update-index –assume-unchanged -z –stdin Note that because this is an index-based operation, you cannot set directories to be ignored – only individual files. If upstream ever adds a file inside those directories, you will have to repeat the fix-up.
As with many aspects of svn, tortoise makes it really easy. In fact, I believe tortoise actually adds features by using existing svn features in a systematic way. I realize this answer is windows only, then, but perhaps some people out there are like me and still use windows. In the “Check for Modifications” popup … Read more
Preferences > Team > Ignored Resources
You can use the skip-worktree bit. Turn it on with: git update-index –skip-worktree <file> After that, git will never stage local changes for <file> and will fail (loudly) if git itself has to write to <file> (say, in a merge or a checkout). If you ever want to stage a future change, you can turn … Read more
As mentioned in gitignore, git has 3 ignore files: Patterns which should be version-controlled and distributed to other repositories via clone (i.e., files that all developers will want to ignore) should go into a .gitignore file. (that takes care of all time: if one clones your repo, it will get the .gitignore file) Patterns which … Read more
.hgignore does not need to be created before init It the config file will be used by others, you’d better commit the .hgignore so others dont have to create it, but this is not needed for mercurial to ignore your local files (see example) Yes .hgignore has to be in the root directory Simple example. … Read more
The solution is to place a leading slash on the .gitignore entries: /foo/ /bar.txt (I thought I tried this before posting on StackOverflow, but clearly I hadn’t tried it properly, as this works perfectly.)
For C++ projects, you should be fine ignoring the following files: *.sdf and *.opensdf (temporary file opened only while .vcxproj/.sln is loaded to Visual Studio IDE) *.suo *.vcxproj.user ipch folder, if your project uses Pre-compiled Headers (PCH); it is a storage for Intellisense compiler which can now utilise PCH for better performance For C# projects, … Read more
Jetbrains has some official guidance on which files should not be checked in, and which files should probably not be checked in, depending on your usage. According to that page, you should check in all files in the .idea directory except: workspace.xml tasks.xml And probably also: the xml files in the dictionary subdirectory While the … Read more