git: upload-bundle: add command

master
Alan Faubert 1 year ago
parent a4221f0e66
commit cbe14ea0a8

@ -16,6 +16,7 @@
- [`git snapshot`](scripts/git-snapshot) - save/load the current `HEAD` plus staged changes plus unstaged changes - call without arguments to save, call with previous return value to load
- [`git track`](scripts/git-track) - set current branch to track given remote and branch, defaulting to same branch name
- [`git turbo-gc`](scripts/git-turbo-gc) - turbo garbage collect
- [`git upload-bundle`](scripts/git-upload-bundle) - upload a bundle file to a remote repository
## Git Credential Manager Core WSL/Windows interop

@ -0,0 +1,7 @@
#!/bin/sh
set -o errexit
if [ $# != 2 ]; then >&2 echo 'Arguments: <source.bundle> <remote url>'; exit 1; fi
tmp_dir="$(mktemp --directory)"
trap 'rm --force --recursive "$tmp_dir"' EXIT
git clone --mirror "$1" "$tmp_dir"
git -C "$tmp_dir" push --mirror "$2"
Loading…
Cancel
Save