Skip to content
  • Home
  • About
  • No Access
  • Privacy Policy
Bits of .NET
Bits of .NET
  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Tag: Data Recovery

Git

Git: Recover a Commit You Accidentally Amended Over the Wrong Change

- 26.09.26 - ErcanOPAK comment on Git: Recover a Commit You Accidentally Amended Over the Wrong Change

🔀 The Amend That Overwrote a Commit You Actually Wanted to Keep `git commit –amend` is meant to fix the most recent commit – a typo in the message, a forgotten file – but running it at the wrong moment (after switching what’s staged, or simply out of habit) replaces that commit’s content entirely, and […]

Read More
Photoshop

Photoshop: Recover Layers Lost After Flattening an Image by Mistake

- 26.09.26 - ErcanOPAK comment on Photoshop: Recover Layers Lost After Flattening an Image by Mistake

🖌️ You Flattened the Image by Mistake – Here’s How to Get the Layers Back Image → Flatten Image merges every layer into one, permanently discarding the layer structure – and doing this by mistake (a misclick, a keyboard shortcut muscle-memory from a different action) feels catastrophic the moment it happens, but recovery is often […]

Read More
Git

Git: Recover a File Overwritten by a Bad Merge

- 06.09.26 - ErcanOPAK comment on Git: Recover a File Overwritten by a Bad Merge

🔀 A Bad Merge Just Overwrote Your File – Here’s How to Get the Right Version Back A merge completes without any conflict markers at all, and yet a file ends up with the WRONG content – one side’s changes silently won, the other side’s were lost – which happens most often with a merge […]

Read More
Git

Git: Recover Work After Accidentally Running git checkout — . on the Wrong File

- 05.09.26 - ErcanOPAK comment on Git: Recover Work After Accidentally Running git checkout — . on the Wrong File

🔀 One Wrong git checkout — . and Your Uncommitted Edits Are Gone Meaning to discard changes in one specific file, a slightly wrong command instead runs against the whole directory – git checkout — . – silently reverting EVERY unstaged change across the entire working directory back to the last commit, including work that […]

Read More
Photoshop

Photoshop: Recover a File Saved Over the Wrong Version by Accident

- 05.09.26 - ErcanOPAK comment on Photoshop: Recover a File Saved Over the Wrong Version by Accident

🖌️ Ctrl+S Saved Over the Wrong Version – Here’s What Might Still Be Recoverable A quick, habitual Ctrl+S saves the current file – and it turns out to be the wrong one, overwriting a previous, still-needed version with today’s different edits, permanently as far as the file on disk is concerned. There are still a […]

Read More
Wordpress

WordPress: Recover Deleted Media Files That Are Still Referenced in Old Posts

- 05.09.26 - ErcanOPAK comment on WordPress: Recover Deleted Media Files That Are Still Referenced in Old Posts

📝 The Image Is Gone From the Media Library – It’s Still Broken on 12 Old Posts A media library cleanup deletes an image that looked unused, and afterward, several old blog posts that actually referenced it start showing a broken image icon instead – the file is gone from the server, but WordPress never […]

Read More
Photoshop

Photoshop: Recover an Unsaved File After Photoshop Crashes Mid-Edit

- 31.08.26 - ErcanOPAK comment on Photoshop: Recover an Unsaved File After Photoshop Crashes Mid-Edit

🖌️ Photoshop Crashed Mid-Edit – Your Work Might Still Be There An hour of careful editing, no save in a while, and Photoshop crashes or the computer freezes and needs a hard restart. It feels like everything is gone – but Photoshop has more than one safety net built in, and checking them takes far […]

Read More
Git

Git: Recover a Stash You Accidentally Dropped

- 31.08.26 - ErcanOPAK comment on Git: Recover a Stash You Accidentally Dropped

🔀 git stash drop Deleted Work You Actually Needed – It’s Still Recoverable You clean up old stashes with git stash drop (or stash pop went wrong and cleared the entry), only to realize seconds later that one of them had uncommitted work you actually still needed. It feels gone – it almost always isn’t. […]

Read More
SQL

SQL Server: Recover Data From a Corrupted Database Using DBCC CHECKDB Before You Panic

- 31.08.26 - ErcanOPAK comment on SQL Server: Recover Data From a Corrupted Database Using DBCC CHECKDB Before You Panic

🗄️ Before You Restore From Backup, Run This One Command A query suddenly throws a corruption error – torn page, checksum mismatch – and the instinct is to panic and start restoring from last night’s backup immediately, losing a full day of transactions. There’s a faster, less destructive first step almost everyone skips. 🐞 The […]

Read More
Windows

Windows 11: Recover Files After Emptying the Recycle Bin by Accident

- 31.08.26 - ErcanOPAK comment on Windows 11: Recover Files After Emptying the Recycle Bin by Accident

🪟 Recycle Bin Emptied by Mistake – It’s Not Necessarily Gone A quick ‘Empty Recycle Bin’ click, done on autopilot, turns out to have included a file you actually still needed. It feels final and irreversible – but as long as you act quickly and stop using that drive, there’s a real chance of getting […]

Read More
Git

Git: Fix a Repository That Won’t Clone Because of One Corrupted Object

- 31.08.26 - ErcanOPAK comment on Git: Fix a Repository That Won’t Clone Because of One Corrupted Object

🔀 One Bad Object Blocks the Entire Clone A teammate tries to clone a repository that’s cloned fine for everyone else, and it fails partway through with an error about a corrupted or missing object — one damaged commit, tree, or blob deep in the history is enough to stop the whole clone cold. 🐞 […]

Read More
SQL

SQL Server: Recover a Dropped Table in Seconds Before the Space Gets Reused

- 31.08.26 | 31.08.26 - ErcanOPAK comment on SQL Server: Recover a Dropped Table in Seconds Before the Space Gets Reused

🗄️ Dropped a Table? The Clock Is Running Running DROP TABLE on the wrong table is instantly recoverable in the first moments after it happens — and increasingly unrecoverable as more writes happen and SQL Server reuses the freed disk space, so what you do in the next few minutes matters more than almost any […]

Read More
Windows

Windows 11: Recover Files From a Drive That Suddenly Shows as RAW

- 30.08.26 | 31.08.26 - ErcanOPAK comment on Windows 11: Recover Files From a Drive That Suddenly Shows as RAW

🪟 Drive Shows as RAW? Don’t Format Yet Windows suddenly asking “You need to format the disk before you can use it” and showing the file system as RAW instead of NTFS looks like the drive died — but the actual data is very often still physically intact, and formatting is the one action guaranteed […]

Read More
Photoshop

Photoshop: Recover a File That Won’t Open Due to ‘Could Not Complete Your Request’

- 30.08.26 | 31.08.26 - ErcanOPAK comment on Photoshop: Recover a File That Won’t Open Due to ‘Could Not Complete Your Request’

🖌️ “Could Not Complete Your Request” Doesn’t Mean It’s Gone Photoshop refusing to open a file with the vague error “Could not complete your request because of a program error” is one of the most alarming messages in the app — but it’s usually partial file corruption, incompatible metadata, or a permissions issue, not a […]

Read More
SQL

SQL Server: Recover an Accidental UPDATE Without WHERE Using the Transaction Log

- 30.08.26 | 31.08.26 - ErcanOPAK comment on SQL Server: Recover an Accidental UPDATE Without WHERE Using the Transaction Log

🗄️ No WHERE Clause = Every Row Changed You ran an UPDATE meant for one row, forgot the WHERE clause, and every row in the table now has the same value. The transaction already committed. Here’s how to actually get the data back. 🚨 Do This in the First 60 Seconds Stop writing to the […]

Read More
Git

Git: Recover Uncommitted Changes After git checkout — . Wipes Your Working Directory

- 30.08.26 | 31.08.26 - ErcanOPAK comment on Git: Recover Uncommitted Changes After git checkout — . Wipes Your Working Directory

🔀 checkout — . = Uncommitted Work Gone git checkout — . silently discards every unstaged change in your working directory, no confirmation, no undo command — but depending on exactly what you had done before running it, some of that work may still be recoverable. 🚨 First: Know What’s Actually Recoverable Changes that were […]

Read More
Photoshop

Photoshop: Recover Unsaved Work After a Crash Using the Hidden Auto-Recover Files

- 30.08.26 | 31.08.26 - ErcanOPAK comment on Photoshop: Recover Unsaved Work After a Crash Using the Hidden Auto-Recover Files

🖌️ Crashed Before Saving? Check Recovery First Photoshop crashing before you hit save feels like losing everything — but as long as Auto-Recover is enabled (it is, by default, since Photoshop CC), your last several minutes of work are very likely sitting in a recovery file you haven’t looked for yet. 🔍 What Auto-Recover Actually […]

Read More
Photoshop

Photoshop: Recover a Corrupted PSD File Without Losing Your Layers

- 30.08.26 - ErcanOPAK comment on Photoshop: Recover a Corrupted PSD File Without Losing Your Layers

🖌️ Corrupted ≠ Unrecoverable Photoshop crashes mid-save, or a file transfer gets interrupted, and now your PSD won’t open — “Could not complete your request because the file is not compatible with this version” or it just fails silently. Before you accept the loss, try these in order. 🐞 The Problem Opening client-project-final.psd in Photoshop: […]

Read More
Windows

Windows 11: Recover Permanently Deleted Files (Shift+Delete) in Minutes With One Free Tool

- 30.08.26 - ErcanOPAK comment on Windows 11: Recover Permanently Deleted Files (Shift+Delete) in Minutes With One Free Tool

🪟 Deleted ≠ Gone Forever You pressed Shift+Delete instead of Delete, emptied the Recycle Bin, or the file just vanished — and it’s not in the Recycle Bin to restore. Before you panic, know this: the file usually isn’t gone, only its address book entry is. 🔍 Why This Works — Cause & Effect Deleting […]

Read More
Git

Git: Use git reflog to Recover Deleted Commits

- 19.03.26 | 19.03.26 - ErcanOPAK comment on Git: Use git reflog to Recover Deleted Commits

💾 Git’s Time Machine Accidentally deleted branch? Reset to wrong commit? Reflog saves you. # View all HEAD movements (last 90 days) git reflog # Output shows: # abc1234 HEAD@{0}: reset: moving to HEAD~1 # def5678 HEAD@{1}: commit: Important work ← You want this! # Restore that commit git checkout def5678 git checkout -b recovery-branch […]

Read More
Git

Recover Deleted Git Commits Even After Hard Reset (It’s Not Gone)

- 01.02.26 | 01.02.26 - ErcanOPAK comment on Recover Deleted Git Commits Even After Hard Reset (It’s Not Gone)

Accidentally did ‘git reset –hard’ and lost hours of work? Your commits aren’t deleted – they’re just orphaned. Here’s how to find them. The Magic Command – Reflog: git reflog This shows every HEAD movement in your repository, even deleted commits. Output looks like: a1b2c3d HEAD@{0}: reset: moving to HEAD~3 e4f5g6h HEAD@{1}: commit: Added user […]

Read More
Wordpress

Recover Deleted WordPress Posts from Database (Even Without Backups)

- 01.02.26 | 01.02.26 - ErcanOPAK comment on Recover Deleted WordPress Posts from Database (Even Without Backups)

Accidentally permanently deleted a post? If you acted within 30 days and your host hasn’t optimized the database, there’s a good chance it’s still recoverable. How WordPress “Deletes” Posts: When you empty trash, WordPress doesn’t immediately erase the post row. It updates the post_status to ‘trash’ first, then later to ‘inherit’ (for revisions). The actual […]

Read More
November 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« Oct    

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,055)
  • Get the User Name and Domain Name from an Email Address in SQL (981)
  • How to add default value for Entity Framework migrations for DateTime and Bool (977)
  • Get the First and Last Word from a String or Sentence in SQL (858)
  • How to select distinct rows in a datatable in C# (854)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (653)
  • Add Constraint to SQL Table to ensure email contains @ (609)
  • Average of all values in a column that are not zero in SQL (570)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (547)
  • Find numbers with more than two decimal places in SQL (475)

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit
  • SQL Server: Fix ROW_NUMBER Ties Reordering Between Identical Runs
  • C#: Fix an Enum HasFlag Returning True for the Zero Value
  • WordPress: Fix Featured Images Vanishing After a CDN Migration
  • Photoshop: Fix Content-Aware Fill Smearing a Repeating Pattern
  • Asp.Net Core: Fix Antiforgery Tokens Rejected Behind a Reverse Proxy

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,055)
  • Get the User Name and Domain Name from an Email Address in SQL (981)
  • How to add default value for Entity Framework migrations for DateTime and Bool (977)
  • Get the First and Last Word from a String or Sentence in SQL (858)
  • How to select distinct rows in a datatable in C# (854)

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com