-
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
/**
* 1. git remote add <project-name> <project-repo>
* 2. git fetch <project-name>
* 3. git checkout -b <project-name> <project-name/master>
* 4. make a folder move all files to that subfolder, so no merge conflicts
* - use something like `mv $(command ls -A) subfolder`
* - it includes all files and folders, including the dot ones
* - ignore the warning it cannot move subfolder into itself, it's OK
* 5. git commit -m "chore: move <project-name> into the monorepo"
*
* Follow the following, OR create a PR
*
* 6. git checkout master
* 7. git merge <project-name>
* 8. git push
* 9. cleanup
* - git remote rm <project-name>
* - git branch -d <project-name>
*/
and useful function for moving everything into a subfolder
# Also creates the folder name you passed, if it doesn't exist
# ignore the warnings, it does the correct job
moveAllTo() {
if [ ! -d "$(pwd)/$1" ]; then
mkdir -p "$(pwd)/$1"
fi
mv $(command ls -A) $1
}
Metadata
Metadata
Assignees
Labels
No labels