Git Reset Branch to Master (main)
Resetting a branch to match the state of the master
(or main
, as it is now commonly called) branch is a common requirement, especially when you need to discard local changes or ensure that your branch starts fresh from a known good state. Below, I'll detail the Git commands necessary to perform this reset, explaining why and when you might need to use each command.
C# (14)
retail (4)
planning (4)
Blog (3)
advent of code 2017 (3)
TDD (2)
VSCode (2)
Kubernetes (2)
unit testing (2)
acceptance testing (2)
books (2)
career (2)
Statiq (1)
Wyam (1)
Linux (1)
Dotfiles (1)
Obsidian (1)
Second Brain (1)
Git (1)
GitLab (1)
DevOps (1)
Visual Studio (1)
Istio (1)
Visual Studio Code (1)
Open-faas (1)
Slack (1)
Helm (1)
Netlify (1)
nodejs (1)
GraphQL (1)
PostgreSQL (1)
Go (1)
functional (1)
review (1)
tools (1)
goals (1)