Skip to content

New Module Checklist

Sergio del Amo edited this page Apr 11, 2024 · 9 revisions

Steps

Splitting a module out of core to its own repo

Here are the steps followed when we created micronaut-session

https://docs.github.com/en/get-started/using-git/splitting-a-subfolder-out-into-a-new-repository

Step by step; (Replace micronaut-session for your new module name, and session as your sub-project of interest)

  1. Install git-filter-repo
    brew install git-filter-repo
    
  2. Clone the branch of core you're interested in extracting from
    git clone https://github.com/micronaut-projects/micronaut-core.git -b 4.0.x micronaut-session
    
  3. go into the new directory
    cd micronaut-session
    
  4. Filter the repo to remove anything non-session related
    git filter-repo --path session/
    
  5. Rename the branch to master
    git branch -m master
    
  6. Strip all the tags
    git tag -d $(git tag -l)
    
  7. Strip all the branches
    git branch | grep -v "master" | xargs git branch -D
    
  8. Create a new public project on GitHub under micronaut-projects called micronaut-session
  9. Add a remote pointing to this new repo
    git remote add origin https://github.com/micronaut-projects/micronaut-session.git
    
  10. From a local recent clone of https://github.com/micronaut-projects/micronaut-project-template, copy all the files into the current folder.
  11. Fix them up with your project name, as per normal
  12. Push
git push origin master

You will need to copy docs from core/src to your new repo.

Then follow the steps above