8000 Monorepo migration · Issue #923 · overleaf/overleaf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
8000
Skip to content
Monorepo migration #923
Closed
Closed
@das7pad

Description

@das7pad

Overleaf has migrated all of its active repositories into a monorepo to ease
the developer experience when making changes in multiple places for a new
feature.

We used this opportunity to change our default branch from master to main as
well.

The new home of the public code will be overleaf/overleaf on GitHub.

The existing repositories will get archived on GitHub. This will retain
read-only access to pull-requests, issues and code (with old git SHAs).

Services like chat or web will be located in monorepo/services/chat/
monorepo/services/web, libraries like o-error in
monorepo/libraries/o-error and server-ce on top-level monorepo/server-ce.

The integration of all the repositories required rewriting the history for a
proper git-log experience in individual files/directories.
This in turn changes all the git-hashes of commits.

Unfortunately the community will not be able to pull new changes or merge
our main branch into forks.
Instead a new/forced checkout of the repository is needed, and changes to code
will need to be rebased.

In most cases a rebase can get changes into the new home and git will detect
that files have been moved. Example for migrating a web branch.

     web$ git checkout BRANCH-NAME
     web$ git fetch origin master
     web$ git rebase origin/master
monorepo$ git remote add import-web /path/to/web
monorepo$ git fetch import-web BRANCH-NAME
monorepo$ git fetch import-web master
monorepo$ git checkout BRANCH-NAME
monorepo$ git rebase --onto main import-web/master
monorepo$ git remote remove import-web

This will migrate the changes to existing files to the files in their new
location.
However it will not be able to move newly created files to the new directories.
These will need to moved explicitly, e.g. as part of an interactive rebase
(add --interactive to the second rebase command and pause when a commit added
a new file, move it to the new place, git stage everything and resume
rebasing).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0