Skip to content

Instantly share code, notes, and snippets.

View dbirks's full-sized avatar
🫎

David Birks dbirks

🫎
View GitHub Profile
@dbirks
dbirks / migrate-git-repos.md
Last active May 22, 2025 03:52
Script to fully migrate git repos, including all tags and branches

Migrate git repos script

I used this for migrating git repos from Bitbucket to Github. It uses git's --mirror flag for cloning and pushing to also transfer all tags and branches.

It would be helpful to have SSH keys set up on both ends. Then all you should have to do is to make sure the hardcoded orgname is set to the appropriate one for both the source and destination.

Once I migrated repos, I used this to replace my origin url locally (assumes using ssh):

sed -i s/bitbucket.org:orgname/github.com:orgname/g .git/config
@dbirks
dbirks / clean-build.sh
Created September 30, 2020 03:08
Clean build an Arch Linux package inside a container
#!/bin/sh
set -o errexit
trap "docker rm --force lens-build" EXIT
docker pull archlinux
docker run \
--detach \
@dbirks
dbirks / notebook.ipynb
Created October 14, 2023 19:59
Convert RDS backup into sql file
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.