GitHub Integration with Salesforce
This content walks through the initial steps of integrating GitHub with Salesforce development workflows by demonstrating how to create a private GitHub repository and push existing Salesforce VS Code project code. It highlights the importance of Git for collaboration and version control in Salesforce projects. Salesforce teams can set up their source control environment and prepare the foundation for automating CI/CD pipelines. The detailed git commands make it easy to replicate the setup process.
- Create a private GitHub repository to manage Salesforce project code.
- Use VS Code and Git CLI commands to initialize and push code to GitHub.
- Ensure a package.xml manifest is included in Salesforce projects for deployment.
- Only the main branch is used initially for committing changes.
- Prepare for future automation of CI/CD processes for Salesforce.
GitHub As developers, we want to collaborate code with our peers and other developers. GitHub is an online software development platform . It’s used for storing, tracking, and collaborating on software projects. The steps shown below needs a VS Code project with manifest ( package.xml) file and existing code Step 1: Sign in to your GitHub account. Create a Project Repository by logging into your GitHub account, as shown in the image below (keep its access private). Step 2: Clone the GitHub repository locally on your machine Install this Extension in your VS Code On your local computer, install Git. Clone the primary GitHub repository once you’re finished. I followed the following git commands on VS Code Terminal window. Please note the git repository url needs to be updated to your own git url git init git add README.md git commit -m "first commit" git branch -M main git remote add origin https://github.com/<test-name>/>repo-name-test.