Update git-branch.md

This commit is contained in:
Erik Cochran 2020-01-09 18:45:50 -08:00 committed by GitHub
parent bc51528f1a
commit eb2a0eabe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -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
```