Open 0xPratik opened 2 years ago
Yes, you can create a template repository on GitHub and then use Anchor CLI to create a new Anchor workspace from that template. Here are the steps you can follow:
Create a new repository on GitHub and add your code to it.
Go to the repository settings and click on the "Template repository" checkbox.
Install Anchor CLI by running the following command in your terminal:
npm install -g @project-serum/anchor-cli
Clone the template repository to your local machine:
git clone https://github.com/your-username/your-repo-name.git
Create a new Anchor workspace from the template by running the following command:
anchor init --from-template your-username/your-repo-name
This will create a new Anchor workspace with the same code as your template repository.
You can now make changes to the code in your new workspace and push them to your own repository.
To use the template, others can simply click on the "Use this template" button on your GitHub repository and create a new repository from the template.
I hope this helps! Let me know if you have any questions.
Can we have a use template button with an anchor workspace setup so that folks can fork it and use it.