Created
October 4, 2023 18:45
-
-
Save organom/33f374e6cdb8310b4cc222256d1c92f3 to your computer and use it in GitHub Desktop.
Resets and cleans git changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!#/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