Sublime Forum

How do I show the .git folder in sublime text 3 in the sidebar?

#1
{
	"folders":
	[
		{
			"path": ".",
			"folder_include_patterns": [".git"],
		}
	]
}

I have tried that above code by going to Project >>> Edit Project as I only need it for this particular project. According to the documentation for Sublime Text 3 the above should work? What am I doing wrong in this respect?

0 Likes

#2

The issue here is that you are excluding everything but .git, but then the default folder_exclude_patterns are excluding .git.

You’ll want to override the default folder_exclude_patterns with a list that does not include .git.

More or less, all of the folder_*_patterns end up excluding folders, just the folder_include_patterns one says exclude everything not in this list, whereas the folder_exclude_patterns lists exactly what to exclude.

2 Likes

#3

So based off what you said and based off whats in the Preferences.sublime-settings file I did:

{
	"folders":
	[
		{
			"path": ".",
			"folder_exclude_patterns": [".svn", ".hg", "CVS"],
		}
	]
}

for my projectname.sublime-project file.

It still does not show the .git folder.

I have even tried enabling windows hidden files from within explorer and it still does not show the .git folder in sublime text.

0 Likes

#4

I am still struggling with this, sorry to sound needy but would be great to get an answer / further help.

0 Likes

#5

You might need to restart Sublime Text to see changes in folder_exclude_patterns (at least that’s what I’m seeing in build 3202 for global config).

0 Likes

#6

ok, but I still don’t know what I need to type / put in this file in order to show the .git folder? I tried a restart and this did not work.

0 Likes

#7

I found doing this line in user settings then restarting sublime text fixed this issue, rather than doing it at the project settings level, weird it does not work at the project level.

0 Likes