Skip to content

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
Git

Why Git Rebase “Loses” Commits (It Doesn’t — You Did)

- 29.01.26 - ErcanOPAK

Commits aren’t deleted — they’re detached.

What actually happens

  • Rebase rewrites history

  • Old commits lose branch references

  • They become unreachable, not gone

Recovery

git reflog
git checkout <lost-commit-hash>

Lesson
If Git feels scary, you’re missing the mental model, not commands.

Related posts:

Git History Looks Clean but Bugs Exist

How to solve 'Microsoft.TeamFoundation.Git.Contracts.GitCheckoutConflictException' problem

Git Hooks Break CI Unexpectedly

Post Views: 0

Post navigation

Why Fetch Requests “Randomly” Hang (But Server Is Fine)
Stop Using git pull (Yes, Really)

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

January 2026
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Dec    

Most Viewed Posts

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

Recent Posts

  • Why foreach Is Sometimes Slower Than for
  • The Hidden Cost of Exceptions as Flow Control
  • Why lock Can Kill Throughput
  • Indexes Can Make Queries Slower (Here’s Why)
  • Why SELECT * Slowly Destroys Performance
  • The Real Cost of IHostedService Misuse
  • Why Async Controllers Still Block Threads
  • Stop Using git pull (Yes, Really)
  • Why Git Rebase “Loses” Commits (It Doesn’t — You Did)
  • Why Fetch Requests “Randomly” Hang (But Server Is Fine)

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (924)
  • How to add default value for Entity Framework migrations for DateTime and Bool (819)
  • Get the First and Last Word from a String or Sentence in SQL (815)
  • How to select distinct rows in a datatable in C# (789)
  • How to make theater mode the default for Youtube (687)

Recent Posts

  • Why foreach Is Sometimes Slower Than for
  • The Hidden Cost of Exceptions as Flow Control
  • Why lock Can Kill Throughput
  • Indexes Can Make Queries Slower (Here’s Why)
  • Why SELECT * Slowly Destroys Performance

Social

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