Aug 5, 2019

SFDX: Importance of Version Control: Getting your code in Github

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 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 "--Your Git UserName--"
git config "--Your Git Email--"
//From the base project directory
git add .
git commit --message "First Commit"
git remote add origin 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

Whatsapp Button works on Mobile Device only

Start typing and press Enter to search