Created
February 26, 2023 19:21
-
-
Save theipster/6c78430a3fff6f080761d8dc588dea6e to your computer and use it in GitHub Desktop.
Better git subtree
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Example of how to import Flyway migration scripts sourced in a separate repo | |
git fetch $(cat path/to/repo/url) refs/tags/<tag>:refs/tags/<tag> | |
git read-tree --prefix=db -u refs/tags/<tag> | |
git rm -r src/main/resources/db | |
git mv db/ src/main/resources/ | |
git commit | |
git tag -d <tag> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment