mirror of
https://github.com/rstacruz/cheatsheets.git
synced 2026-04-27 03:00:45 -04:00
@@ -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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user