mirror of
https://codeberg.org/james-smith-za/git-tidy-python.git
synced 2026-01-15 11:19:24 +02:00
A small Python script to tidy things up and leave your git repo in a pristine condition so that you can start hacking.
| .flake8 | ||
| .pre-commit-config.yaml | ||
| git-tidy.py | ||
| LICENCE | ||
| mypy.ini | ||
| pyproject.toml | ||
| README.md | ||
git-tidy
I wrote this utility to save myself some repetitive typing, because I often come back to a repo after a while of not using it, and in the meanwhile a remote may have moved on or I'm not sure what state it's in.
So this gets it cleaned up relatively quickly.
It's more or less the equivalent of
git checkout main
git fetch --all --purge # purge is to delete unnecessary remote refs
git merge origin/main main --ff-only
git branch --merged | grep -v main | xargs git branch -d
with some extra convenience and (I hope) safety features.