Skip to content

Instantly share code, notes, and snippets.

@organom
Created October 4, 2023 18:45
Show Gist options
  • Save organom/33f374e6cdb8310b4cc222256d1c92f3 to your computer and use it in GitHub Desktop.
Save organom/33f374e6cdb8310b4cc222256d1c92f3 to your computer and use it in GitHub Desktop.
Resets and cleans git changes
!#/bin/bash
function git-reset-and-clean() {
git fetch origin
git reset --hard origin/$(git branch --show-current)
git clean -xdf
}
git-reset-and-clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment