Created
April 19, 2016 14:00
-
-
Save oniryx/d9c45a5ea214690aeb14906c881fbffe to your computer and use it in GitHub Desktop.
Move git submodule code into the git main repo
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
#! /bin/bash | |
# | |
# WARNING: You will lose all git history of the submodule | |
# | |
$submodule_path='' | |
$backup_path='' | |
rm -rf $submodule_path/.git | |
cp -a $submodule_path $backup_path | |
git submodule deinit -f $submodule_path | |
git rm -f $submodule_path | |
git commit -m 'Remove submodule' | |
cp -a $backup_path $submodule_path | |
git add $submodule_path | |
git commit -m 'Add code submodule' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment