4

This same question has been asked already, but the accepted answer isn't working for the new version of Netbeans 8.2. The .git directory that Netbeans isn't showing is at the same level of .gitignore, at the root of the project.

So, how to show it?

enter image description here

Community
  • 1
  • 1
oidualc
  • 1,104
  • 1
  • 14
  • 21
  • Add the directories to the "Favorites" window - that will show hidden directories as well. –  Oct 11 '16 at 08:39
  • Do you still see the "Ignored Files" option I mentioned before? It is still sthere in NetBeans 8.X: https://netbeans.org/bugzilla/show_bug.cgi?id=258349. Or https://blogs.oracle.com/netbeansphp/entry/ignored_folders_sure mentioned in https://netbeans.org/bugzilla/show_bug.cgi?id=254713 – VonC Oct 11 '16 at 08:50
  • @VonC do you mean the "Ignored Files Pattern"? If so yes, I can see it as shown in the screenshot, I've just blanked it out because I want to show all the files. – oidualc Oct 11 '16 at 08:55
  • So the issue is: even when blanked, it does not show up. But you do confirm it is at the expected place on your file explorer? (ie outside NetBeans) – VonC Oct 11 '16 at 09:00
  • @VonC yes absolutely. I can't see neither .git nor .svn, both at the same place. The difference is I don't care about .svn :) – oidualc Oct 11 '16 at 09:11
  • @oidualc Just for testing, what would happen if you moved out of the way the .svn folder? – VonC Oct 11 '16 at 09:28
  • @VonC nothing interesting.. Netbeans recognizes the Git repository and in the context menu I can control that one instead of the Subversion one... ".git" directory is still not visible. – oidualc Oct 12 '16 at 08:19
  • @a_horse_with_no_name Tried it and couldn't manage to add ".git" to the favourites. Even when tricking Netbeans into opening the file chooser IN the .git, pressing OK did not do the trick. – mdr Apr 27 '17 at 12:01

1 Answers1

0

This appears to not work as expected in both Netbeans 8.1 and 8.2, however here is a workaround.


Creating a link to the .git folder

I noticed that no matter what you do in Settings -> Miscellaneous -> Files -> Files Ignored by the IDE, the .git folder does not appear in the Files panel.

However, if you were only interested in the contents of the .git folder then creating an alias to it worked for me:

ln -s .git .git-alias

Or for Windows,

 mklink /J .git-alias .git  

(Read more about creating junctions or symbolic links and why you would want to prefer one over the other here and here respectively)

Change Netbeans setting to not ignore .git* folders

After that, starting from the default settings, I changed the Files Ignored by the IDE to remove .git so that it becomes:

^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn)$|~$|^\.(hg|svn|cache|DS_Store)$|^Thumbs.db$

And the .git-alias folder appeared fine:

enter image description here

Community
  • 1
  • 1
Ashutosh Jindal
  • 18,501
  • 4
  • 62
  • 91