From eb2a0eabe15fb33f96ea60a26d1b583385738e70 Mon Sep 17 00:00:00 2001 From: Erik Cochran Date: Thu, 9 Jan 2020 18:45:50 -0800 Subject: [PATCH] Update git-branch.md --- git-branch.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/git-branch.md b/git-branch.md index da3ad10a6..87ee9f2f5 100644 --- a/git-branch.md +++ b/git-branch.md @@ -71,3 +71,15 @@ Works for tags, too! ```bash git show-ref HEAD -s ``` +### Reset branch and remove all changes + +```bash +git reset --hard +``` +### Undo commits to a specific commit and push to branch + +```bash +git reset --hard [commitID] +//Now push to your branch +git push --force +```