Created
December 30, 2017 01:39
-
-
Save jtremback/fae923212aa442b86cda305af790a387 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!bash | |
set -eux | |
cd "$1" || exit | |
# git remote rm origin | |
CONTENTS="$(ls) .gitignore" | |
mkdir -p "$1" | |
git mv -- $CONTENTS "$1/." | |
git commit -m "Prepare $1 to merge into $2" | |
cd "../$2" || exit | |
git remote add "$1" "../$1" | |
git pull "$1" master --no-edit --allow-unrelated-histories | |
git remote rm "$1" | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment