How to use github for salesforce


How To Use GitHub Actions for Salesforce

  • Create a .github directory at the root level of your repository.
  • Create a workflows directory in the . github directory.
  • Create a new file named push-action-deploy.yml in the workflows directory.

  1. Step 1: Log In to your GitHub Account. Log in to your GitHub account as shown in the image below and create a Project Repository (keep its access private). …
  2. Step 2: Clone the GitHub Repository. Install Git on your local computer. …
  3. Step 3: Retrieve Metadata Files from SFDC. …
  4. Step 4: Configure the Git Repository.
Sep 7, 2021


Table of Contents

Do Salesforce developers use Git?

GitHub is designed to provide a highly transparent and contextual environment for developers to do their best work. In short, Git handles version control and GitHub handles collaboration. The Modern Developer’s Toolkit. Together, Git and GitHub form the heart of the modern developer’s toolkit. Similar to Salesforce apps, hundreds of …

Should Microsoft acquire GitHub?

When you step back and observe all the trends in software, Microsoft buying GitHub is a no-brainer. It is all about cloud and winning the cloud wars. GitHub will be part of the toolset Microsoft uses to win. Have a Comment on this? Cancel reply

Does Salesforce publish their soql grammar?

Use the Salesforce Object Query Language (SOQL) to search your organization’s Salesforce data for specific information. SOQL is similar to the SELECT statement in the widely used Structured Query Language (SQL) but is designed specifically for Salesforce data. With SOQL, you can construct simple but powerful query strings in the following …

How to integrate Jira with Salesforce?

  • 3+ years experience in a Business Analyst or Strategy related role.
  • Experience with Salesforce Sales Cloud, Service Cloud, Community Cloud and/or Marketing Cloud.
  • Experience leading projects in process improvement, change management, organizational transformation, requirements management, and/or facilitating workshops.

More items…


How do I deploy from GitHub to Salesforce?

The main steps are:Create a branch off of main.Make commits.Open a pull request.Collaborate. Make more commits. Discuss and review code with team members.Deploy for final testing.Merge your branch into the main branch.

Do we use Git in Salesforce?

There are many flavors of version control, but Git is the de facto standard for Salesforce. Git provides teams with the ability to separate out multiple streams of development and avoid stepping on each other’s toes by making changes in isolated branches, instead of in shared sandboxes.

How do I commit a code in Salesforce?

Commit the Changes to the Source Control RepositoryIn VS Code, select the. Source Control icon.Enter a commit comment, then click the. Commit icon.Click Yes to add and commit the files.From the VS Code command palette, select Git: Push To.Select the origin repository.

What is the key relationship between Git and GitHub Salesforce?

GitHub is a collaboration platform that is built on top of Git. II)GitHub is Git for teams. III)Git and GitHub are the same product, but with slightly different names based on whether you use it locally or through a web browser. IV)GitHub is the graphical user interface for Git, but it has identical functionality.

Why GitHub is used in Salesforce?

You can enhance the features of Salesforce by setting up Salesforce GitHub Integration. GitHub is a Collaborative Platform that holds repositories of codes in Cloud-based storage. It makes it easy for multiple developers to work on a single project and track the changes in real-time.

What is repository in Salesforce?

Repository tab is mainly used for understanding the related entities of any concerned apex code. In an organization, there could be thousands of apex classes through which the control navigates.

How do I add Salesforce code to GitHub?

Add a Salesforce DX Project to Source ControlCreate a GitHub Repository. You’ll need a GitHub repository to share your project with the DreamHouse Realty team. … Install Git. … Configure Your Git Identity. … Create a Local Git Repository. … Push Your Files to GitHub. … Resources.

How do I link my VSC to GitHub?

To push the code to GitHub from Visual Studio Code, you will need to create a GitHub account and install the “Github Pull Requests and Issues” extension. Note: Before pushing the code from VS Code to GitHub, you need to ensure that all the files are in one folder, and you have to push your folder to Github.

What is the difference between Git and GitHub *?

GitHub… what’s the difference? Simply put, Git is a version control system that lets you manage and keep track of your source code history. GitHub is a cloud-based hosting service that lets you manage Git repositories.

How do I create a pull request in Salesforce?

Pull requests provide a way for teams to track, review, and combine team members’ work.Publish your changes in GitHub. … Create a pull request; select Branch > Create Pull Request. … The pull request’s body is populated with several headers.More items…

What is VCS Salesforce?

A version control system (VCS) tracks and manages the changes you make to your data. For complex, low-code Salesforce apps, such as Salesforce CPQ and Field Service Lightning, tracking the changes to your configuration data as you move the data from developer sandbox to QA to UAT to production is critical.

How do I use DX in Salesforce?

4:3130:36Introduction to Salesforce DX – YouTubeYouTubeStart of suggested clipEnd of suggested clipAnd each of those scratch works can be used for lots of different things and as you’re starting upMoreAnd each of those scratch works can be used for lots of different things and as you’re starting up that new scratch org and you’re creating or writing a new feature you’re pushing all of that.


Listed below are the prerequisites of setting up Salesforce GitHub Integration:

Introduction to Salesforce

Salesforce is a Customer Relationship Management (CRM) platform that provides your the applications and tools to connect with your Customers, Prospects, Partners, etc. It is one of the best CRMs and enables your business to sell, service and market.

Introduction to GitHub

GitHub is a Collaboration Platform that helps a developer connect with other developers or his team members to solve problems. With GitHub, developers can build software together as it allows them to make separate changes to their programs in real-time (without getting in each other’s way).

Steps to Set Up Manual Salesforce GitHub Integration

This method requires you to have the technical knowledge and experience in working with Salesforce and GitHub. It involves a couple of steps like retrieving content definition, etc that need to be performed manually. This includes manually integrating Salesforce and GitHub to track your Ad Campaigns and connect with your customers more easily.

Challenges Involved in Setting Up Salesforce GitHub Integration Manually

Although you have now successfully set up Salesforce to GitHub Integration, this method involves various limitations. These are the challenges you might have to face while setting up this integration. Listed below are the limitations of setting up Salesforce GitHub Integration manually:

Benefits of Salesforce GitHub Integration

Now that you have a basic understanding of Salesforce & GitHub and have gone through different methods to set up Salesforce GitHub Integration, let’s talk about the advantages of this integration. Listed below are the advantages of Salesforce GitHub Integration:


This article introduced you to Salesforce and GitHub. It provided the method that you can use to set up Salesforce GitHub Integration. This method involves using Salesforce IDE or GitHub Plugin for Manual Integration of Salesforce and GitHub.

Why Set up a Github Salesforce Integration in the First Place

Github is an online source code management and versioning platform. It helps developers consolidate and collaborate their codes to maintain a consistent version that can be accessed and tracked by all the team members.

Choosing the Right Technology for a Github Salesforce Integration

However, implementing a GitHub Salesforce integration is not as easy as it sounds.

How to Set up a Github Salesforce Integration: the Step-by-Step Process

To start setting up a Github Salesforce integration, you must first install Exalate on both GitHub and Salesforce. This ensures you have autonomy since the Exalate app on both sides allows you to configure each side separately and helps you control what can be sent and received.

Common Use Cases

The most plausible use case that can be supported by a GitHub Salesforce integration is enabling seamless collaboration between sales and development teams.


We saw how a Github Salesforce integration can definitely help sales and development teams collaborate and share business-critical information with each other to help them enhance customer experience.

What is github for developers?

Github allows central repositories to be setup quickly and easily in the cloud and extends command line Git with a very intuitive and easy to use Web UI as well as plugins to IDE’s. Developers can push to and clone or pull code from Github repositories as well as merge code easily via Github’s “Pull Request” functionality.

Can developers retrieve Salesforce metadata?

Developers can retrieve all or part of their Salesforce Organisation’s Metadata content pending development requirements and push this Metadata to Github for source code versioning and collaboration. How to Setup and Use Salesforce Version Control with Github.

What is GitHub flow?

The GitHub flow is a lightweight workflow that lets you experiment with new ideas safely, without fear of compromising a project. The main steps are: Branching is a key concept within Git. Everything in Git lives on a branch. By default, the production version of your project lives in the main branch.

How to clone a repository on GitHub?

To clone a repository, follow these steps: In GitHub, click the Code tab of the repository you just created. Click the Code button. Copy the clone URL to your clipboard. Open your command line application.

What is a local repository?

If the local directory is linked to a remote repository, then the local repository is a full copy with everything on the remote repository, including all of its files, branches, and history.

How does git keep track of history?

When you work locally, Git keeps track of your history by organizing your files and changes in three trees. They are working, staging (also called index), and history.

What is a branch in git?

Branching is a key concept within Git. Everything in Git lives on a branch. By default, the production version of your project lives in the main branch. When you’re ready to experiment with a new feature or fix an issue, create a new branch of the project.

Can you make changes to a project on GitHub?

You can make changes to your project directly on GitHub, but most people prefer to work on their local machine so they can make changes in their favorite IDE or text editor. Let’s review a couple important terms:

Can you use git bash on a Mac?

If you are on a Mac or Linux, you can use your terminal. If you are on Windows, we recommend you use Git Bash, which comes installed with Git. Retrieve a full copy of the repository from GitHub: git clone <CLONE-URL>. Replace <CLONE-URL> with the clone URL you copied above.

What is the purpose of deployment manifest?

The goal of the deployment manifest is to pile up the metadata that will be promoted to the environment pipelines. This means that each and every release (no matter where it’s a major/minor/hotfix/patch) will have it’s own deployment manifest file.

Can you create a github workflow?

You can create Github Workflows in your Repository that will execute Github Actions and may deploy (or validate the deployment) automatically your code into target orgs upon events such as commit/push or pull request being created. I prepared for you a Github Action that will execute the following steps:

What is a Workflow?

When you talk about GitHub Actions, you talk about workflows. Workflows are configurable processes where you specify your jobs to run. This might sound difficult at first, but believe me, it’s not. Jobs are written in a YAML file, which runs when a workflow runs.

Sample Workflow

For reference, I have created a gist where you can get the source code for this workflow.


The name of the workflow or job will be used for identification in the build logs, where you can view the workflow and jobs’ statuses. If you omit the name of the workflow, GitHub uses the path to that workflow from the root of the repository.


Each workflow is made up of one or more jobs, which are the pieces giving life to your functionality. By default, each job runs parallel, but you can make them run sequentially. A virtual environment must be specified for these jobs to run.You can do this by using the ‘runs-on’ keyword. This is a required field.


We can see that in our case, on every push and pull request to the master branch, our workflow will authorize an org, run all the test classes, and deploy our changed code to that org if everything works out. This saves developers time and effort since all these things would otherwise need to be done manually.

Source Model

It sounds like you are already practicing source-oriented development using the Org Development Model (cf. also Trailhead ). If you’re all set up there, that’s great. If not, and you still need to retrieve some customizations, you’ll need to develop a package.xml file and pull the source down from your production org.

Starting with Git

Adding GitHub is a natural extension of a source-based development process, and is especially critical when using a shared, persistent sandbox for development.

Working with Git Flow

You and your colleague will have to get used to working in some flavor of Git Flow. (See Trailhead ).

Next Step: Scratch Orgs

Scratch orgs are the next step in source-based development and provide you and your colleagues with individualized, disposable Salesforce environments. When you get to the point where you’re fully comfortable working local-first in source format, you may be ready to start experimenting with pushing your code and metadata into scratch orgs.


Leave a Comment