add revert commit

This commit is contained in:
Niccolo Borgioli 2023-06-16 12:35:54 +02:00
parent 5c05023784
commit 237a6cf548
No known key found for this signature in database
GPG Key ID: D93C615F75EE4F0B

View File

@ -0,0 +1,16 @@
# Revert branch to commit
Revert a branch to a certain commit, discarding newer ones.
```bash
# Specific commit
git reset --hard a1d6424
# Commits back
git reset --hard HEAD@{3}
```
```bash
# Push
git push -f
```