Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update preserving-git-histories.md #27846

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/shared/migration/preserving-git-histories.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@ In order to avoid merge conflicts later, it's best to first do the folder reorga

```shell
cd my-standalone-app
git checkout main
git fetch
git checkout -b monorepo-migration origin/master
git checkout -b monorepo-migration main
mkdir -p apps/my-standalone-app
git ls-files | sed 's!/.*!!'| uniq | xargs -i git mv {} apps/my-standalone-app
```
Check if you need to move back the `.gitignore` file to the root and/or update any paths so you don't commit previously ignored files/folders.
If all is well proceed with the commit and push.

```shell
git commit -m "Move files in preparation for monorepo migration"
git push -u
git push --set-upstream origin monorepo-migration
```

Next, in your monorepo, we'll add a remote repository url for where the standalone app is located:
Expand Down