Discard all local changes
Reset tracked files and remove untracked files/directories
git restore . && git clean -fd
More git commands
-
git tag -l -n1List all tags with their first annotation line
-
git tag -s v1.2.3 -m 'Release 1.2.3'GPG-signed annotated tag for releases
-
git fetch --pruneRemove local refs to remote branches that no longer exist
-
git clone --depth=1 --single-branch --branch main <url>Clone only the latest commit of one branch (fast CI checkout)
-
git shortlog -sn --allRanked list of authors by total commit count