Merge pull request #1323 from erok415/patch-2

Update git-branch.md
This commit is contained in:
Rico Sta. Cruz 2020-01-20 16:16:15 +11:00 committed by GitHub
commit 4704baedfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -79,3 +79,17 @@ 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
```bash
git reset --hard $commit_id
# Now push to your branch
git push --force
```