
Script: ABAP Tools - abapGit Plugin [003]
How do you find the views for abapGit, configure them, link a Git repository, and make your first commit? In this episode, we'll walk you through it step by step.
Table of contents
Introduction
In this episode, we'll look at setting up the abapGit plugin, create a Github repository, and then synchronize our project.
Displaying Views
The first step is to display the appropriate view. You can find this using the magnifying glass at the top, or you can display the search function using the keyboard shortcut CTRL + 3. Here, we'll search for Git. If the view is too small, you can resize it to see more views. The first view we'll display is the repositories. All of the system's repositories are always displayed here. Next, we display the Staging View, which will be used later for staging the objects. Since we usually hide our additional functions in the side menu, we can adjust the size of the view accordingly.
Git Repository
Next, we create a new Git repository. To do this, we go to Github and, via "Your Repositories," we can view our own repositories. We can define a new repository via "New." We give the repository a name and a corresponding description. We check the "Add a Readme file" box so that the repository is initialized. In the repository, we can then copy the repository's URL using the Code button.
Connect
Next, we call up the Repository View and can add a new Git repository using the "Plus" icon. To do this, we enter the URL and can then select the branch and add our local package. "Pull after link" We don't need this because we don't have any objects in the repository. We'll leave the logic set to "Full." This connects the repository to the system. Next, we go to the Staging View, select our GitHub repository, select all objects, and add the objects to the next commit. We enter "Initial Commit" as the commit message because this will be our first initial commit. Next, we enter the user and the corresponding token to perform the commit. If we then refresh GitHub, the objects should be there. Using the "Commits" button, we can see the most recent commits; if we select this button, we'll see all committed objects as content. In this case, packages and our class.
To test, we can now adjust the class and change the "Hello youtube" to "Hello github." Then switch to the Staging tab and update the content using the refresh button. Our change should now appear there. We add the object, set a new commit message, and press the "Commit and Push" button to push the changes to the repository. If we then go back, we will see the new commit. If we look at the commit, we will see the change we made. If we look at the entire repository, the repository is structured according to the packages we created, and we can find our class in that package.
Conclusion
This concludes today's session. You should know how to set up views in the ABAP Development Tools, how to connect to the GitHub repository, and how to push the corresponding content.
See you next time.
Video
YouTube