Distributed Software development teams often forget to utilize this simple technique for version control. Whether you use this for obsessive branching and release management OR use this as a simple backup measure, leveraging version control is wise, time saving and a face saver at times.
Salesforce code deployment happens on your scratch orgs OR sandboxes, so code is "mostly" safe from getting wiped out, however even then version control will help distributed teams, multiple lines of development and uncovering problems rapidly. Login to your Github.com account and create a project repository. Next, from the terminal window (OR VisualStudio Code's terminal window) in your base SFDX project directory .. perform the following sequence of commands.
git init git config user.name "--Your Git UserName--" git config user.email "--Your Git Email--" //From the base project directory git add . git commit --message "First Commit" git remote add origin https://username:password@github.com/username/--Already created Repository Name--.git/ git push -u origin master
As a best practice, I often recommend keeping the same repository name, SFDX project name in VSCode, Base directory name (Windows/Mac) and finally the same SFOrg Alias name while login in (authenticating in VSCode), which you can find out by using
sfdx force:org:list --verbose -all
Post a Comment