Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 5

Hidden file contents

Solved! Go to Solution.

Hello everyone. I was wondering if it was possible to make a file or a folder (mostly a folder) visible on GitHub, but have that file's contents hidden. Something like when submodules are grey-ed out. 

Please excuse my bad english and you should now that I'm new to GitHub.


Thanks in advance

4 Replies
Pilot Lvl 2
Message 2 of 5

Re: Hidden file contents

Hi @AlexejheroYTB,


Welcome to the community forums. :-)


When you say hidden, do you mean greyed out in the file viewer on If so, there isn't a way to do that right now, but if instead you simply don't want a specific file or folder contents to be uploaded to GitHub in the first place, you'll want to add that file or folder to your .gitignore file


Here are instructions on how to do that:


​If there's anything else I can help you with, let me know; so happy to help further!


Kindest regards,

Copilot Lvl 2
Message 3 of 5

Re: Hidden file contents

I understand. I wanted to have them grey-ed out so that someone who looks in my repo knows that the folder is there, but they can't see what's inside

Community Manager
Message 4 of 5

Re: Hidden file contents

Hi @AlexejheroYTB

One of the reasons for this is that if a user can see a repository, they can download or clone that repository as well. Even if a file was hidden in the file viewer, it would be accessible in the downloaded file.



Copilot Lvl 2
Message 5 of 5

Re: Hidden file contents

I understand. Thank you!