diff --git a/git-branch.md b/git-branch.md index 87ee9f2f5a..c35f70ca91 100644 --- a/git-branch.md +++ b/git-branch.md @@ -76,10 +76,12 @@ git show-ref HEAD -s ```bash git reset --hard ``` -### Undo commits to a specific commit and push to branch + +### Undo commits to a specific commit ```bash -git reset --hard [commitID] -//Now push to your branch +git reset --hard $commitID + +# Now push to your branch git push --force ```