How to have Sublime Text 2 show git folders and files in the sidebar?

Solution 1:

In Sublime Text, go to Preferences -> Settings - Default, scroll down to line 290 and remove .git from 'folder_exclude_patterns' property

Solution 2:

Go to Preferences -> Settings-User. Modify the rule folder_exclude_patterns to contain an array of patterns to exclude. I chose to leave it empty:

{
    "bold_folder_labels": true,
    "caret_style": "phase",
    "color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme",
    "font_size": 14,
    "highlight_line": true,
    "line_padding_bottom": 1,
    "line_padding_top": 1,
    "tab_size": 4,
    "translate_tabs_to_spaces": true,
    "folder_exclude_patterns" : [] // the rule in question
}