Skip to content

Commit

Permalink
docs: update preserving-git-histories.md (#27846)
Browse files Browse the repository at this point in the history
While following the docs to preserve git histories I ran into some
issues.
This update hopefully makes sure any future readers can complete the
outlined procedure successfully
  • Loading branch information
groninge01 authored Nov 20, 2024
1 parent 1c2ae37 commit 548973c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/shared/migration/preserving-git-histories.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,19 @@ 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

0 comments on commit 548973c

Please sign in to comment.