Get your git repo into a tidier state, so that you can carry on developing.
Go to file
2023-01-28 22:39:06 +02:00
.flake8 Initial commit. 2023-01-26 07:43:08 +02:00
.pre-commit-config.yaml More tinkering. Lots of refactoring to get it to do what I want. 2023-01-28 22:09:50 +02:00
git-tidy.py More tweaks. I am more or less happy now. 2023-01-28 22:39:06 +02:00
LICENCE Initial commit. 2023-01-26 07:43:08 +02:00
mypy.ini More tinkering. Lots of refactoring to get it to do what I want. 2023-01-28 22:09:50 +02:00
pyproject.toml Initial commit. 2023-01-26 07:43:08 +02:00
README.md More tweaks. I am more or less happy now. 2023-01-28 22:39:06 +02:00

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.