whatfileis.pro
Paste a filename and find out what it is, whether it is safe, and what opens it.

What Is a .ORIG File?

A .orig file appeared next to a file you edited. A tool saved the original before changing it — often during a patch or a Git merge. Here is what to do with it.

Category
Safe to delete?
Opens with

What a .orig file is

A .orig file is the original, unmodified copy of a file that a tool kept as a safety backup before altering it. The patch command and Git merge conflicts are the most common sources: they save filename.orig so you can compare against the version from before the change.

Why you have one

During a merge or patch, the tool rewrote your file and preserved the pre-change state as .orig in case you need to review or revert.

How to open a .orig file

Ignore the .orig extension — the file is plain content of whatever it originally was (code, text, config). Open it in the same editor you use for the real file, or rename a copy by removing .orig. To see exactly what changed, diff it against the current file: diff main.js.orig main.js, or use your editor's compare feature.

Is it safe to delete?

Yes, once your merge or edit is finished and the working file is correct. .orig files are leftovers, not something your project needs. Developers routinely add *.orig to .gitignore and clean them up.

How to handle a .orig file by OS

Windows: open in VS Code or Notepad++, or delete once the merge is done. macOS/Linux: remove all of them at once with find . -name '*.orig' -delete after you have verified your changes.

Common problems

If a merge went wrong, the .orig is your reference to the pre-merge state — diff it to recover lines you lost before deleting it.

FAQ

How do I open a .orig file?

Open it in a text or code editor — it is the original file's content. Remove the .orig from a copy if you want the plain file back.

Is it safe to delete a .orig file?

Yes, once your merge or patch is done and the working file is correct. .orig files are leftover backups.

What creates .orig files?

The patch command and Git merge conflicts save filename.orig as a backup of the pre-change version.

How do I see what changed vs the .orig?

Run diff filename.orig filename, or use your editor's compare feature to view the differences.

Other file types explained