MSNCodeSNIPPETS← msncode.dev
snippets/git

Create and Switch Branch

Create a new branch and switch to it in one command

gitbashbranchcreate
BASH
git checkout -b feature/new-feature

More git snippets

Amend Last Commit Message

Change the message of your most recent commit

Cherry-Pick a Commit

Apply a specific commit from another branch

Force Push Safely

Force push only if no one else has pushed in the meantime

Rebase onto Main

Rebase current branch onto latest main