How to integrate abapGit with GitHub

0
3125

Dear SAPLearners, in this blog post we will learn on how to integrate abapGit with GitHub. This blog post is continuation to our last blog post on abapGit.

You can read it here abapGit Introduction

Prerequisites

You should have met below prerequites to proceed with this tutorial

abapGit integration with GitHub

In our previous blog post we have created an abapGit repository now its time to integrate and push the ABAP code to GitHub.

1. Create a new repository on GitHub and copy the URL of the repository.

abapGit integration with GitHub Step1

2. In abapGit client, choose the repository and navigate to Advanced > Make on-line.

abapGit integration with GitHub Step2

3. On Attach remote repository pop-up window, enter the GitHub repository URL created in above Step-1 and you can leave other fields to default. Click OK.

abapGit integration with GitHub Step3

4. After successfully, you will be navigated to a screen like below. Click on Stage to stage all ABAP objects under the package.

abapGit integration with GitHub Step4

5. Click on Add all and Commit button to commit the ABAP objects to remote GitHub repository.

abapGit integration with GitHub Step5

6. Enter Comments and click on Commit.

abapGit integration with GitHub Step6

7. Enter GitHub user and password and hit Execute.

abapGit integration with GitHub Step7

8. After successfully commit, all ABAP objects are pushed to GitHub account.

abapGit integration with GitHub Step8

Now we have pushed all our ABAP code to GitHub. Lets look at the process on how to push the subsequent code changes done to the ABAP program.

Lets change the code in an ABAP report program.

9. In this example ZTEST_GIT is the ABAP program which i have already pushed to GitHub. Added a new abap code like below

abapGit integration with GitHub Step9

10. Now check the abapGit client, you will see that the changed ABAP program is highlighted like below.

abapGit integration with GitHub Step10

11. You can even click on View diff button to compare the ABAP code changes.

abapGit integration with GitHub Step11

12. Finally stage and commit the changes, follow the steps 4, 5 and 6.

13. You will see that update code changes are now pushed to GitHub account.

abapGit integration with GitHub Step12

Congrats!!! you have successfully learned on how to integrate abapGit with GitHub repository.

Conclusion

abapGit is very nice tool and best fit for Agile methodology of development and have many possibilities to integrate with CI tool of choice. abapGit is used to easily migrate the code from ABAP on-premise system to SAP Cloud Platform ABAP environment.

SAP Community references