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: branching

Git

Git: Fix git stash pop Failing With Conflicts Because the Stash Was Created on a Different Branch Than the One You Are Restoring It To

- 31.10.26 - ErcanOPAK comment on Git: Fix git stash pop Failing With Conflicts Because the Stash Was Created on a Different Branch Than the One You Are Restoring It To

🔀 Fix git stash pop Failing With Conflicts Because the Stash Was Created on a Different Branch Than the One You Are Restoring It To A Git stash is not tied to the branch it was created on in any way Git actually enforces. Stashing just snapshots the working tree and index relative to whatever […]

Read More
Git

Git: Fix git worktree add Checking Out a Branch That Silently Diverges From the Same Branch in the Main Working Tree

- 30.10.26 - ErcanOPAK comment on Git: Fix git worktree add Checking Out a Branch That Silently Diverges From the Same Branch in the Main Working Tree

🔀 Fix git worktree add Checking Out a Branch That Silently Diverges From the Same Branch in the Main Working Tree Running git worktree add without a -b flag, pointed at something like a remote-tracking ref (origin/hotfix) rather than the local branch name (hotfix), checks that worktree out in detached HEAD state at that commit […]

Read More
Git

Git: Fix git log Showing a Completely Different History on Two Clones of the Same Branch Because One Has an Unpushed Interactive Rebase

- 29.10.26 - ErcanOPAK comment on Git: Fix git log Showing a Completely Different History on Two Clones of the Same Branch Because One Has an Unpushed Interactive Rebase

🔀 Fix git log Showing a Completely Different History on Two Clones of the Same Branch Because One Has an Unpushed Interactive Rebase An interactive rebase rewrites commit hashes locally. If someone rebases a branch – squashing, reordering, or editing commits – but never pushes, or pushes to a shared branch that someone else had […]

Read More
Git

Git: Fix a Merge Commit That Silently Drops a File Because Both Branches Deleted It Differently

- 04.10.26 - ErcanOPAK comment on Git: Fix a Merge Commit That Silently Drops a File Because Both Branches Deleted It Differently

🔀 The File Two Branches Both Agreed to Lose Git’s three-way merge treats a file as cleanly resolved, with no conflict markers and no manual intervention needed, whenever both sides of the merge agree on the outcome for that file – and two branches that each independently deleted the same file, for entirely different and […]

Read More
Git

Git: Recover From Committing to the Wrong Branch by Accident

- 31.08.26 - ErcanOPAK comment on Git: Recover From Committing to the Wrong Branch by Accident

🔀 Wrong Branch, Right Commit – Easy to Fix You typed a few commits, went to push, and only then noticed you were still on main instead of your feature branch. Nothing is actually broken – the commits exist and are safe – they’re just sitting on the wrong branch, waiting to be moved. 🐞 […]

Read More
Git

Git: Fix ‘Your Branch and Origin Have Diverged’ Without Losing Either Side’s Commits

- 30.08.26 | 31.08.26 - ErcanOPAK comment on Git: Fix ‘Your Branch and Origin Have Diverged’ Without Losing Either Side’s Commits

🔀 Diverged Branches ≠ Lost Commits “Your branch and ‘origin/main’ have diverged, and have 3 and 2 different commits each” looks alarming, but it just means both you and someone else committed since your last sync — nothing is lost, and Git is only waiting for you to choose how to combine them. 🔍 What […]

Read More
Git

Git: Advanced Branching Strategies for Teams

- 17.08.26 - ErcanOPAK comment on Git: Advanced Branching Strategies for Teams

🌿 Branching Strategies = Team Productivity Chaotic branching hurts productivity. Advanced branching strategies keep your team’s codebase clean and organized. 📝 Branching Strategies # Git Flow – master (production) – develop (integration) – feature/* (features) – release/* (releases) – hotfix/* (emergency fixes) # GitHub Flow – main (production) – feature/* (features) – Simple, single branch […]

Read More
Git

Git: Choose the Right Branching Workflow

- 10.07.26 - ErcanOPAK comment on Git: Choose the Right Branching Workflow

🌿 Branching Workflows = Git Success Random branching causes chaos. Git workflows bring order. Choose the right strategy for your team. 📝 GitHub Flow (Simple) # Main branch (always deployable) main # Feature branches feature/xxx bugfix/xxx # Workflow git checkout -b feature/add-login # Make changes git add . git commit -m “Add login feature” git […]

Read More
Git

Git: Choose the Right Branching Workflow

- 07.07.26 - ErcanOPAK comment on Git: Choose the Right Branching Workflow

🌿 Branching Workflows = Git Success Random branching causes chaos. Git workflows bring order. Choose the right strategy for your team. 📝 GitHub Flow (Simple) # Main branch (always deployable) main # Feature branches feature/xxx bugfix/xxx # Workflow git checkout -b feature/add-login # Make changes git add . git commit -m “Add login feature” git […]

Read More
Git

Git: Use Cherry-Pick to Apply Specific Commits Across Branches

- 30.03.26 - ErcanOPAK comment on Git: Use Cherry-Pick to Apply Specific Commits Across Branches

🍒 Pick Commits Like Cherries Need one commit from another branch? Don’t merge everything. Cherry-pick copies specific commits to your current branch. Surgical precision. The Problem # Scenario: Bug fix on wrong branch git branch * feature-login main hotfix # You committed bug fix to feature-login # But it needs to be on hotfix branch […]

Read More
Git

Visualize Branch History Clearly

- 26.01.26 - ErcanOPAK comment on Visualize Branch History Clearly

git log –oneline –graph –all Why it mattersInstant mental model of the repo.

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