mirror of
https://codeberg.org/james-smith-za/git-tidy-python.git
synced 2026-01-15 19:29:25 +02:00
Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
| 263882fd42 |
1 changed files with 13 additions and 5 deletions
18
README.md
18
README.md
|
|
@ -14,20 +14,29 @@ git fetch --all --prune # prune is to delete unnecessary remote refs
|
||||||
git merge origin/main main --ff-only
|
git merge origin/main main --ff-only
|
||||||
git branch --merged | grep -v main | xargs git branch -d
|
git branch --merged | grep -v main | xargs git branch -d
|
||||||
```
|
```
|
||||||
|
|
||||||
with some extra convenience and (I hope) safety features.
|
with some extra convenience and (I hope) safety features.
|
||||||
|
|
||||||
## Using
|
## Using
|
||||||
|
|
||||||
The actual script is named `git-tidy`. After cloning, you can copy (or symlink)
|
The actual script is named `git_tidy.py`. After cloning, you can copy (or symlink)
|
||||||
it to somewhere on your path (I use `~/bin/`).
|
it to somewhere on your path (e.g. `~/bin/git-tidy`).
|
||||||
|
|
||||||
|
Alternatively, you can use a package manager such as
|
||||||
|
[`uv`](https://docs.astral.sh/uv/concepts/tools/). My personal preference is
|
||||||
|
this, as `uv` will place the tool on the PATH for you and you can get straight
|
||||||
|
to using it.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv tool install https://codeberg.org/james-smith-za/git-tidy-python.git
|
||||||
|
```
|
||||||
|
|
||||||
Then when you `cd` to your git repository, you can type
|
Then when you `cd` to your git repository, you can type
|
||||||
```bash
|
```bash
|
||||||
git tidy
|
git tidy
|
||||||
```
|
```
|
||||||
and it'll do its thing! Only the Python standard library is used, no additional
|
and it'll do its thing! Only the Python standard library is used, no additional
|
||||||
packages are required.
|
packages are required. I have tested (manually) with Python 3.8 through to
|
||||||
|
3.13, so I would imagine that future versions should work just fine.
|
||||||
|
|
||||||
## Background
|
## Background
|
||||||
|
|
||||||
|
|
@ -36,7 +45,6 @@ redo this program in Go at some point, which will make it easier to distribute
|
||||||
for people who don't have Python installed by default (i.e. Windows users). But
|
for people who don't have Python installed by default (i.e. Windows users). But
|
||||||
I'm not sure when I'll get to that.
|
I'm not sure when I'll get to that.
|
||||||
|
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
I'd like to actually get a set of unit-tests in place, but I'm not sure how to
|
I'd like to actually get a set of unit-tests in place, but I'm not sure how to
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue