How to open .GITIGNORE files (project dotfiles) on Android, Windows and Linux
What .gitignore, .htaccess, .npmrc, .lock and .patch files are, and how to open, read and edit these dotfiles for free on Android, Windows and Linux.

You copied a project to your phone, or unzipped someone’s code on a laptop, and found a file called .gitignore with nothing before the dot. Windows asks which app should open it. On Linux, and in many Android file managers, you may not see it at all, because a name that starts with a dot means “hidden”.
The answer is simpler than the name suggests: .gitignore and the other project dotfiles are plain text. Folders opens them in its built-in text editor on Android, Windows and Linux, where you can read, search, edit and save them.
What is a .gitignore file?
A .gitignore file tells Git which files to leave out of version control: build output, node_modules, logs and secrets such as .env. Each line is a pattern. # starts a comment, * matches anything, a trailing / means “only folders”, and ! brings back something an earlier line excluded. Each .gitignore applies to its own folder and everything below it.
The leading dot is an old Unix habit for files you don’t need to see every day, and .gitignore rarely travels alone. Most code projects carry a small family of dotfiles and machine-written files:
| Extension | What it is | Where you meet it |
|---|---|---|
.gitignore |
Patterns of files Git should not track | Almost every Git repository |
.gitattributes |
Per-path rules for Git: line endings, diffs, Git LFS for large files | Projects shared between Windows and Linux |
.editorconfig |
Indentation, character set and line-ending rules for code editors | Shared projects |
.npmrc |
npm settings, such as the package registry, and sometimes a login token | JavaScript projects, your home folder |
.babelrc |
Settings for Babel, the JavaScript compiler, as JSON | Older JavaScript and React projects |
.eslintrc |
Rules for the ESLint checker, in JSON or YAML | JavaScript projects (newer ESLint uses eslint.config.js) |
.prettierrc |
Options for the Prettier code formatter | Front-end projects |
.htaccess |
Per-folder settings for the Apache web server: redirects, rewrites, passwords | Websites on shared hosting |
.lock |
A lockfile pinning exact package versions, or an empty “in use” marker | yarn.lock, Cargo.lock, composer.lock, Gemfile.lock |
.pbxproj |
The project file of an Xcode project, in an old property-list syntax | Inside the .xcodeproj folder of iPhone app projects |
.diff, .patch |
A list of changes between two versions of some files | Code reviews, mailing lists, git format-patch |
How to open a .gitignore file with Folders
On Android:
- Install Folders from the download page and allow access to your files.
- Folders lists hidden files on phones from the start, so
.gitignoreshows up like any other file. (If you switched that off, turn Show hidden files back on in Options.) - Go to the project folder, or search for the file name, and tap the file. It opens in the text editor.
- If it’s attached to an email or a chat message, tap it there and choose Open with → Folders.
On Windows and Linux:
- Browse to the project folder in Folders.
- On computers Folders hides dotfiles at first, like other file managers. Open Options and turn on Show hidden files.
- Double-click the file.
Windows’ File Explorer shows dotfiles anyway, as Windows hides files by an attribute rather than by a leading dot. The Folders installer adds Folders to Open with for these types, so you can also right-click the file → Open with → Folders.
Folders knows .gitignore, .gitattributes, .editorconfig and .npmrc by name. For others, such as .htaccess, it checks that the file is text and opens the same editor.
What you can do with it in Folders
- Read it with line numbers, word wrap and adjustable text size.
- Find, or Find and replace (with Match case) to rename a folder in every rule at once, and Go to line when a tool reports an error on line 14.
- Edit and Save. Saving keeps the file’s encoding and line endings, so Git doesn’t see every line as changed.
- Document info shows the encoding and the line endings (LF or CRLF): the first thing to check when a line-ending rule in
.gitattributesor.editorconfigseems ignored. - Read a patch at a glance. In
.diffand.patchfiles, added lines, removed lines and@@headers have their own colours. - Open several files as tabs, or a file in hex viewer to spot invisible characters.
Folders only shows and edits text. It never runs Git, npm or a web server, so nothing in your project changes until you press Save.
Other ways to open .gitignore files
- VS Code (free, Windows and Linux) colours all of these formats.
- Notepad on Windows, or gedit, Kate or nano on Linux.
- Your web host’s file manager, or
nanoover SSH, for.htaccesson a server. - GitHub and GitLab show every dotfile of a repository in the browser.
Problems opening a .gitignore file?
- You can’t see the file. It’s hidden, not missing. Turn on Show hidden files in Folders’ Options; in Linux file managers, Ctrl+H usually does the same.
- Your .gitignore “doesn’t work”. Git only ignores files it isn’t already tracking. Remove a file committed earlier with
git rm --cached <file>and commit again. - Your site shows “500 Internal Server Error” after editing .htaccess. A typo, or a directive for an Apache module that isn’t enabled, breaks the folder. Keep a copy before editing and check your host’s error log. An invisible byte-order mark at the start can cause it too: Document info shows “UTF-8 BOM”, and Notepad++ or VS Code can save the file without one.
- A .lock file is empty. Then it’s a marker that a program is using something, not a lockfile. Leave it while that program runs.
Questions people ask
Can I open a .gitignore file on Android?
Yes. Folders shows hidden files on phones by default and opens .gitignore in its text editor, where you can edit and save it.
Should I edit a .lock file by hand?
No. Let the package manager rewrite it (npm install, cargo update, composer update). Reading it shows exactly which package versions a project uses.
What’s the difference between a .diff and a .patch file?
Usually none: both hold a unified diff. A .patch from git format-patch adds email-style headers (author, date, message) so git am can apply it with credit.
Is a .npmrc file safe to share?
Not if it has a line with _authToken: that token works like a password for your npm account. Check before you commit or send it.
Working with other config formats? See how to open YAML and TOML files and how to open INI, CFG and .env files, or browse all 382 file types Folders opens.
Keep reading
How to open .C files (C and C++ source code) on Android, Windows and Linux
What .c, .h and .cpp files are and how to open, read and edit C, C++ and Objective-C source code for free on Android, Windows and Linux, with no IDE needed.
How to open .CS files (C# source code) on Android, Windows and Linux
What .cs, .csproj, .sln, .vcxproj and .xaml files are and how to open and edit C# code and Visual Studio projects for free on Android, Windows and Linux.
How to open .CSS files (style sheets) on Android, Windows and Linux
What CSS, SCSS, Sass and Less files are and how to open, read and edit style sheets for free on Android, Windows and Linux, with colours, search and replace.



