Skip to content

Instantly share code, notes, and snippets.

View jwarkentin's full-sized avatar

Justin Warkentin jwarkentin

View GitHub Profile
@jwarkentin
jwarkentin / migrate-git-repo.sh
Created March 8, 2024 09:43
Migrate stashes and branches from an old git repo to a new clone
#!/usr/bin/env bash
TMP_SRC_REMOTE="git-stash-copy-source"
TMP_TARGET_REMOTE="git-stash-copy-target"
FROMDIR="$( cd "$1" && pwd )"
TODIR="$( cd "$2" && pwd )"
if ! cd "$FROMDIR" && git rev-parse --git-dir 2> /dev/null ; then
echo "Error: \"$FROMDIR\" is not a git repository"
exit 1

Keybase proof

I hereby claim:

  • I am jwarkentin on github.
  • I am jwarkentin (https://keybase.io/jwarkentin) on keybase.
  • I have a public key whose fingerprint is 8DB5 E388 74AF 9402 0720 9B48 8AAB D5FB 3FB1 AD7E

To claim this, I am signing this object: