Last active
May 10, 2023 14:16
-
-
Save Drambluker/3c5b99d46d186efe379cc61d4047fd7b to your computer and use it in GitHub Desktop.
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/bash | |
export path_to_repo=$1 | |
export directory_path=$2 | |
#git remote add tmp $path_to_repo | |
#git fetch tmp | |
#git merge --allow-unrelated-histories tmp/master | |
#git remote remove tmp | |
#export tmp_dir=tmp-`uuidgen` | |
#git clone $path_to_repo $tmp_dir | |
#cd $tmp_dir | |
#mkdir -p $directory_path | |
#git mv -k * $directory_path | |
#git commit -m "moved to $directory_path" | |
#cd .. | |
#git remote add tmp-repo $tmp_dir | |
#git fetch tmp-repo | |
#git branch tmp-branch tmp-repo/master | |
#git merge tmp-branch --allow-unrelated-histories | |
#git branch -d tmp-branch | |
#git remote rm tmp-repo | |
#rm -rf $tmp_dir | |
git subtree add -P $directory_path $path_to_repo master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment