Skip to content

Instantly share code, notes, and snippets.

@hgraca
hgraca / HOWTO_merge_repositories.md
Last active April 12, 2023 16:49
HOWTO merge repositories

HOWTO merge repositories

In the exporting repo (ex. legacy API into new monolith, the exporting repo is 'legacy API')

git checkout master
git pull
git checkout -b export
git mv public_html lib/legacy/api
git mv .gitignore lib/legacy/api
@hgraca
hgraca / migrate.sh
Last active September 10, 2023 08:30
migrate MySQL db
#!/usr/bin/env bash
#
# This script migrates a DB from one server to another
# It should be run from the source server, the
# destination server or an intermediate server,
# and it assumes ssh connections are configured so that there
# is no need to insert credentials.
#
# You need to call the script as