-
Open the CodeSandbox Link
-
Click on
Fork Sandbox
button. You will see the title change to something like:Drafts/immutable-sea-mgz8o
. If you want, you can click over that title and customize the name, then hit Enter. -
If you see a
Sign in
button, click on it and authorize CodSandbox to use your GitHub account. -
Write a name for your new GitHub repository on the input text then hit Enter.
If everything worked fine, you would see the Github repository directly on CodeSandbox
Now you can make the changes directly on your CodeSandbox, create new files, save them and previsualize your changes in the embedded browser.
Nothing of that would be saved or commited to your GitHub repository until you create a Pull Request (next section)
- Click on Github icon from the CodeSandbox sidebar.
- You would see the list of changed files. Write a summary on the input text right below.
- Be sure to select option:
Create branch csb-xxx999
for the commit and start a PR. That, as you probably infered, will create a commit with your changes. It also will automatically create a new branch with name
csb-xxx999` and a Pull Request with the intention to merge them into the parent branch. - Click con
Commit Changes
button. - Once the process is finished you would see an
Open PR
button. Click on it to open GitHub Pull Request.
Any change you do would be commited to the same PR till you merge into parent branch
We have explored a couple of options for you to continue working with the following mini challenges.
Option 1 (recommended). Work everything on your local and GitHub. Use CodeSandbox to previsualize the result
You could use GitHub and VSCode or any other IDE on your laptop to continue working as you normally do.
- Create a branch for your mini-challenge using GIT from main branch.
- Push your changes there and create a PR on GitHub when you're done.
- To visualize your branch changes in CodeSandbox use the following url format:
https://codesandbox.io/s/github/[your-github-handle]/[your-github-repo]/tree/[branch]
- Verify the link is working
- Remember to share this link in your PR
This option would create so many CodeSandbox links as PR generated
- Go to your PR and merge it
- Refresh your CodeSandbox page and Click on Github icon from the sidebar.
- Click on
Open GitHub Sandbox
then onFork
. This will create another CodeSandbox draft. - Click on
Link Sandbox
- Continue making changes, saving them and follow steps in previous section to create another PR