Skip to content

Instantly share code, notes, and snippets.

@BoxResin
BoxResin / git-commands.sh
Last active January 16, 2023 06:20
Git Commands
// Move the branch pointer to a different commit
git branch -f branch-name commit-name
// Cancel merging
git reset --hard ORIG_HEAD
git reset --merge ORIG_HEAD ;; If you wanna keep your changes
// Cancel editing a file
git checkout -- <file>