
** will search for all the node_modules inside the directory & ignore them. It is useful in monorepo projects where you have node_modules in sub directories. I Opened github desktop -> I made new repo with readme and gitignore -> I made new unity project in.

but gitignore didnt ignore library folder. I was trying to use gitignore for ignoring library folder in unity project folder. Why this approach is better than node_modules/ I am sry if I write something wrong (My first lang is not english so this sentence might weird) Problem. Other consecutive asterisks are considered invalid. For example, a/\**/b matches a/b, a/x/b, a/x/y/b and so on. gitignore file, with infinite depth.Ī slash followed by two consecutive asterisks then a slash matches zero or more directories. For example, abc/** matches all files inside directory abc, relative to the location of the. **/foo/bar matches file or directory bar anywhere that is directly under directory foo.Ī trailing /** matches everything inside. For example, **/foo matches file or directory foo anywhere, the same as pattern foo.
GITIGNORE NOT WORKING GITHUB DESKTOP FULL
Two consecutive asterisks ** in patterns matched against full pathname may have special meaning:Ī leading ** followed by a slash means match in all directories. gitignore, but to answer your question, you should include Debug/. Note that we dont commit our release directory, so you shouldnt include Release/ in your. ** is used for a recursive call in the whole project Heres what weve been using lately, it removes all resharper generated stuff and some other important things. Reference Old Way - (Before ) **/node_modules Solved it to ignore all the node_modules in the subdirectory, note there is no slash before or after which means recursive. So it was a basic issue with git and gitignore and had nothing to do with Sourctree itself.Ī deleted file in '.idea' directory comes up as deletion change in Sourctree as well as a lot of files in the 'target' directory, which should also be ignored as per gitignore_global.In a new monorepo setup I found just using this node_modules env file at the root of the project, because I have a folder for the front-end. As they were now new and new/updated gitignore always grasps only changes after that, they finally did not show up as changes in Sourcetree. Im doing a project in JavaScript (React / Node) and I want to ignore every. I ran my local scripts again, which resulted in the changes in my. I switched branches discarding all changes. They were always existing changes, not new changes. I tried different excludesfile values in the form of `~/gitignore_global.txt` or `C:\\path\\to\\gitignore_global.txt` or `C:/path/to/gitignore_global.txt` - all to no avail. I even created a new gitignore_global.txt in the same path as the. SourceTree wants to commit changes in path ~/.idea although excluded in global gitignore. Switched to Embedded Git 2.36.0 (re-downloaded) - still the same issue. Recently upgraded to 3.4.9.0 - still the same issue. So unchecking it and checking it again might signal SourceTree that you really, really want to enable this option.Ĭan confirm this on Win10 using System Git 2.36.1 (not embedded). So in summary, it looks like SourceTree might not be correctly reading the "allow SourceTree to modify your global Git config files" option.

Also, I noticed that the excludesfile path in my "c:\users\ssmith\.gitconfig" was now set to "C:\\Users\\ssmith\\.gitignore" instead of "~/.gitignore".


And then I set the path for the "Global Ignore List" in the SourceTreeoptions again. After trying a bunch of different ideas, I finally unchecked the "allow SourceTree to modify your global Git config files" option, restarted SourceTree, then checked it again. config/git/ignore in your home directory, if you prefer. Note: The specific name and path you choose arent important as long as you configure git to find it, as shown below. Tell git where your global gitignore file is. The first item at the top of the page is "allow SourceTree to modify your global Git config files" and I verified that this was enabled but I noticed that when I changed the path for the "Global Ignore List" in the SourceTree options that my "c:\users\ssmith\.gitconfig" didn't have the updated excludesfile path. in your home directory and add any filepath patterns you want to ignore. It looks like a bug under the options page. I wasted a couple hours trying to get it working. I recently installed SourceTree on a new Win10 laptop and noticed SourceTree wasn't using my global.
