git Tips

Make git Forget Latest Commits

# Reset the branch to the specified commit
git reset --hard 2476ed3b885282de88de91e65fd7b2c69ecccc30

# Force push the changes to the remote repository
git push origin <branch_name> --force