Search code examples
eclipseegit

Git and Eclipse: show files outside of a project


Disclaimer: I'm new to EGit but familiar with command line Git.

In Eclipse Neon, I have a configured Git repository with this structure:

.git
README.md
.gitignore
projectA
  .project
projectB
  .project
projectC
  .project

Problem: In Enterprise Explorer, Navigator, Project, and Package Explorer, I can only see ProjectA, ProjectB, and ProjectC, not README.md and .gitignore.

Question: How can I modify README.md and .gitignore from inside Eclipse?

Environment: Under Enterprise Explorer > Available Customizations, I have unchecked .*resources. Under Navigator > Filters I have unchecked .*


Solution

  • Package/Project Explorer, Navigator, etc. show only files of into Eclipse imported/opened projects. Files that are starting with . are hidden in the Package/Project Explorer, but are shown in the Navigator view by default.

    1. In the Git Repositories view navigate to the file under the Working Tree node and double-click to open the file. Alternatively, use File > Open File....
    2. Edit and save the file
    3. In the Git Stagging view commit/push the file as usual