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

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