I'm starting a new Trailhead and I want to track it in version control.
Create a new Dev Edition sandbox and a new GitHub repo for your trailhead.
- Sign up for new Dev Edition Sandbox
- Activate My Domain in your Dev Edition Sandbox
- Create new GitHub Repository
- Copy the CloneURL.git
Open the folder that will contain your work. I usually do this in a folder called
workspace
.
- Right Click in your
workspace
folder and clickGit Bash Here
git clone <your-repo-clone-url.git>
cd your-repo-name
sfdx force:project:create -n . -t empty -x
git add .
- `git commit -m "initial commit"
git push
sfdx force:auth:web:login -dsa <my-sandbox-alias> -r https://<my-domain>-dev-ed.my.salesforce.com
sfdx force:source:retrieve -x manifest/package.xml
git add .
git commit -m "add initial sandbox retrieve"
git push