Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.74 KB

repo-moving-tools.md

File metadata and controls

40 lines (28 loc) · 1.74 KB

Guide for migrating code to TheWorldAvatar repositories

  1. Check out the main branch, and list all branches that haven't been merged:

    git branch -a --no-merge
  1. Use the unmerged-branch-checker.sh script at the top level of the repository to list and speciffy a directory you want to check. Output looks like this

    Branch Checker output

    The important lines are the red ones, which show changes to files not on main

  2. Merge and clean up all branches wanted before the port.

  3. Make a fresh clone of TWA repo.

  4. Using git-filter-repo, which is now installed as a script on the branch, run:

     python3 git-filter-repo --path web/twa-vis-platform

    Further documentation on git-filter-repo and its extended capabilities here

  5. Create the new repository on Github (using the template repo if present), leave it empty (do not accept the Github suggestions of adding a README or License).

  6. Set the new repo as the remote origin for the TWA clone with the rewritten history and filtered out directories.

    git remote add origin https://github.com/TheWorldAvatar/<newrepo>.git
  7. Move the content of the filtered directory to the top of the repository.

  8. Either pull the LICENSE.txt, .gitattributes and .gitignore files from the remote repo (if you used the template repo), or copy them from the original TWA repo. You may need to merge the .gitignore and .gitattributes files if the filtered directory already has them.

  9. Push any branches you want to keep to the new remote:

git push -u origin main
  1. Delete any branches that are not relevant.