How to Set up GitHub

How to Set up GitHub

What is GitHub?

GitHub is an online software platform for version control and collaboration. By using GitHub, you and your colleagues can work together on projects no matter where you are. In our projects, we use Git not just to improve our teamwork: we also use it to make it more enjoyable. In the end, a team effort not only ensures a better result, but also a more satisfied feeling. Here’s a short guide on how to start using GitHub.

How to use GitHub?

Step 1: create a repository

A repository is mainly used to organize a single project. They contain everything your project needs: folders and files, images, videos, spreadsheets and datasets. We recommend adding a README of your project, or some kind of file on how to get started. GitHub makes it easy to add one when you create a new repository.

This is how you create a new repository:

  • Click the plus icon in the top right corner next to your avatar and select ‘New repository’;
  • Give it a name and a short description;
  • Select ‘Add a README file.

Step 2: create a branch

Branching is a way to simultaneously work on different versions of a repository.

Your repository normally has one branch called ‘main’ that is regarded as the definitive branch. We use other branches to implement changes and experiment with new code, before these new versions are merged with the main branch.

This is how you create a new branch:

  • Go to your new repository (the one you just made in step 1);
  • Click on the drop-down button called ‘main’, above the file list;
  • Type a branchname, for example ‘readme-adjustments’, in the textbox;
  • Select the ‘create branch’ box or press Enter.

Step 3: create changes (commits)

This is where the fun begins! GitHub calls saved changes ‘commits’. Each commit has a corresponding message, a description that explains why a change has been applied. These messages capture the history of changes: this way, other users know what you did and why.

Apply and keep changes

  • Click on the file ‘README.md’;
  • Click the pencil icon in the top right corner to edit the file;
  • Write something about yourself in the editor;
  • Below the editor, you can describe the changes you just made;
  • To implement the changes, click the green ‘Commit changes’ button.

Step 4: open a pull request

Now that your changes are saved in a different branch, you can open a pull request.

Pull requests lie at the core of collaboration on GitHub. When you open a pull request, you propose your changes and you ask a team member to review, download and merge those changes in their branch. Pull requests show the differences between both branches. The changes are shown in red when the changes are deletions: they are green when they are additions.

Step 5: code review

An important step is carrying out a code review, during which you review your peer’s code and check for any mistakes. This way, the quality and consistency of the project are ensured.

Step 6: Merge your Pull Request

You are now ready to definitively apply your changes by merging the readme-edits branch with the main branch.

  • Click the green ‘Merge pull request’ button.
  • Click the green ‘Confirm merge’ button.
  • You can now delete the readme-edits branch by clicking the grey ‘Delete branch’, as your changes have been applied definitively to the main branch.

You have now accomplished:

  • Creating an open-source repository;
  • Creating and managing a new branch;
  • Edited a file and applied the changes in GitHub;
  • Opened a Pull Request and merged it.

Good luck with setting up your GitHub environment! If you run into any difficulties, feel free to contact us for help.

Related blogs

How to: Getting An App On The AppExchange

How to: Getting An App On The AppExchange

Published 07-07-2021

As a Salesforce developer designing an application or component for the AppExchange can seem like quite a daunting task. But if you break it into small steps and don’t get too lost in small details it can become something quite manageable. Let’s go through all the steps and take the TimeCapsule app as an example.

Everything You Need to Know About DTAP

Everything You Need to Know About DTAP

Published 17-06-2021

Within the world of software development DTAP is a well known term. Working with DTAP is something that comes automatically for most developers. But what exactly is DTAP, how do you integrate a DTAP street and, as it is not a new method, is it still relevant today?

The difference between a software engineer and a software developer

The difference between a software engineer and a software developer

Published 13-06-2021

The terms or job profiles software engineer and software developer are oftentimes used interchangeably. However, a software engineer and a software developer really are two different jobs. In this blog we’ll tell you what both terms, according to us, mean and what the difference is. 

5 Advantages of Salesforce NPSP

5 Advantages of Salesforce NPSP

Published 11-06-2021

About a year ago Salesforce.org introduced the Nonprofit Cloud, a combination of Salesforce products that meet the needs of nonprofit organizations. A big part of the Nonprofit Cloud is the Nonprofit Success Pack, this pack adds elements to Salesforce that are specifically created for nonprofit organizations. Some examples are donation and donor management functionalities and a dashboard for fundraising and campaigns.

Artificial Intelligence and Salesforce Einstein

Artificial Intelligence and Salesforce Einstein

Published 01-06-2021

AI and voice are relatively new concepts for businesses. Concepts which can seem very difficult to start with but just with Blockchain, Salesforce has created a platform to make it very easy for you to incorporate AI in your business, Salesforce Einstein. 

Data visualization in Salesforce

Data visualization in Salesforce

Published 07-05-2021

Did you know it is really easy to visualize your data in Salesforce? As a company you probably have a lot of data in Salesforce. Data can be pretty useful to figure out which areas need improvement or are doing really well. Visualized data makes that even easier. 

What is Salesforce Blockchain?

What is Salesforce Blockchain?

Published 07-04-2021

We were very enthusiastic when Salesforce announced Salesforce Blockchain during the TrailheaDX event of 2019.  Now that it is officially a part of Salesforce, we would like to explain what it is and how you can use it. 

5 Advantages Of A Mobile CRM

5 Advantages Of A Mobile CRM

Published 30-03-2021

Recognize this? Visiting a (potential) client and you cannot get your laptop to work or access the right data and records immediately, despite your preparations.
Luckily, most CRM platforms have a mobile app these days. Using a mobile CRM puts an end to these kinds of issues. Next to having immediate access to your records, there are more advantages to a mobile CRM (like the Salesforce Mobile App):

Switching to Salesforce Lightning

Switching to Salesforce Lightning

Published 20-02-2021

Not sure if you want to switch from Salesforce Classic to lightning? Switching seems like a project that costs a lot of time, not to mention the teams that need to be introduced and get used to a renewed system. Regardless if it takes time, we are convinced switching from Salesforce Classic to Lightning is worth the extra effort.

What is Apex?

What is Apex?

Published 30-01-2021

For Salesforce developers Apex is almost like their second language; they know this type of programming language inside out. But what exactly is Apex and when do you use Apex?