2023.09.10 - updated local repo setup to include a cd
this document will describe how to create a scaffold-eth 2 project with a remote fork and a local worktree
The following examples are based off the following forked se-2 repo:
Visual Studio Code
GitHub Account [your-github]
Navigate to se-2 repo
Click the Fork button to create a fork in [your-github]
Name your [forked-repo]
Create a local se-2 folder to contain projects
example:
PS C:\git> md se-2
In se-2 Clone [your-github] [forked-repo] into a local main branch
Navigate to the se-2 folder and clone your forked repo into a new main folder*./se-2>* git clone https://github.com/[your-github]/[forked-repo].git mainexample:
PS C:\git\se-2> git clone https://github.com/OwlWilderness/se-2.git main
In main Add Worktree for new Project Branch
When creating a new project navigate to the main branch and execute the worktree add command. Specify a branch name and folder location. (the below example will put the folder in the same directory as main)
example:
PS C:\git\se-2\main> git worktree add -B project1 ../project1
Change Directory to new Project
PS cd ../project1
Push to origin
example:
PS C:\git\se-2\project1> git push --set-upstream origin project1
The folder structure should look like the following.
The contents of each folder should contain the scaffold-eth main project.
The remote git repository will contain the new branch.