Set Up the Project on Your Local Machine
Our next goal is to set up the developer project that we use to modify our application. We start by cloning the repository.
If you're a Windows user, first install git for Windows tooling. This tool helps you run git from the command line.
- Open a new Terminal (Mac) or Command Prompt (Windows) window and use the following command to create a unique directory to do your work in:
mkdir my_sfdx_project cd my_sfdx_project
- Next, use this command to clone the app repository:
git clone https://github.com/trailheadapps/dreamhouse-lwc.git
- Next, open the directory:
Cloning the repository pulls all the source code into your local file system. But before you start editing, you first create your own branch. This is a best practice as defined by GitHub Flow, because it helps ensure your Master branch is a clean and production-ready version of your code.
- In your command window, create a new branch to do your work in:
git checkout -b my_branchNow that you’re working in your own branch, it’s easy to submit updates to your team later on.
- In Salesforce DX, we provide a comprehensive set of capabilities through our command-line interface. In the command terminal window, see the available commands by running:
sfdx force --help
Now that we’ve set up our project, our next step is to create our scratch org.
We won't check any of your setup. Click Verify Step to go to the next step in the project.