git: add clean-pr
This commit is contained in:
parent
e044cec2d6
commit
30140ce42e
|
@ -24,6 +24,7 @@ Use `squashfs2tar.sh` to convert squashfs files from e.g. https://cloud-images.u
|
|||
- `git clean-dates` - set commit dates of all commits in the given range to their authoring dates
|
||||
- `git clean-modes` - reset all file modes to to those in the repository
|
||||
- `git clean-original` - delete all `refs/original/` refs left by `git filter-branch`
|
||||
- `git clean-pr` - delete all `pr/` branches created by `git cpr`
|
||||
- `get clean-user` - set author and committer of all commits in the given range to the currently configured identity
|
||||
- `git cpr` - checkout a PR from GitHub by id, and set up the local branch to track the appropriate branch on the appropriate fork
|
||||
- `git index-list-skip` - list all files that have had `--skip-worktree` set on them
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
clean-dates = filter-branch --env-filter 'GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"' --
|
||||
clean-modes = !git -c core.filemode diff -R | grep -E '^(diff|(old|new) mode)' | git apply
|
||||
clean-original = !git show-ref | grep ' refs/original/' | cut -d ' ' -f 2 | xargs -r -n 1 git update-ref -d
|
||||
clean-pr = !git branch --list 'pr/*' | xargs -r git branch -D
|
||||
clean-user = !git filter-branch --env-filter 'GIT_AUTHOR_EMAIL="$(git config --get user.email)" GIT_AUTHOR_NAME="$(git config --get user.name)" GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"' --
|
||||
cpr = "!f() { \"$(dirname \"$(realpath ~/.gitconfig)\")\"/cpr \"$@\"; }; f"
|
||||
index-list-skip = !git ls-files -v | grep ^S | cut -c3-
|
||||
|
|
Loading…
Reference in New Issue