abapGit is the most important open-source tool for version control of ABAP code. In this tutorial, you’ll learn how to install, configure, and effectively use abapGit for professional code management - both for classic ABAP and ABAP Cloud development.
What is abapGit?
abapGit is an open-source Git client for ABAP that is written entirely in ABAP. It enables you to store, version, and share ABAP code in Git repositories with other developers.
Why is abapGit so Important?
In the classic SAP world, version control has always been a pain point:
- Transport system is good for deployments, but bad for collaborative development
- Versions in the system are limited and not branchable
- Code reviews were practically impossible
- Backup and recovery were cumbersome
abapGit solves all these problems by transferring ABAP objects to standardized Git repositories:
| Before (without abapGit) | After (with abapGit) |
|---|---|
| Versions only in SAP system | Complete Git history |
| No branching | Feature branches, bugfix branches |
| Difficult code reviews | Pull requests with diff view |
| Transport-based sharing | Clone and push like any other language |
| Vendor lock-in | Code can be backed up on GitHub/GitLab |
abapGit vs. gCTS
A common question: When do I use abapGit and when gCTS?
| Criterion | abapGit | gCTS |
|---|---|---|
| Target audience | Developers | IT Operations |
| Focus | Code versioning | Transport automation |
| Git integration | Full (Push/Pull) | Export only |
| Open Source | Yes | No (SAP product) |
| Cost | Free | SAP license required |
| CI/CD Pipeline | Manually configurable | Native SAP integration |
| Recommendation | Development & Collaboration | Enterprise deployments |
Summary: abapGit for developers, gCTS for enterprise CI/CD. Both can be combined.
Installation and Setup
Prerequisites
- SAP NetWeaver 7.02 or higher (for classic ABAP)
- ABAP Environment on SAP BTP (for ABAP Cloud)
- GitHub, GitLab, Azure DevOps or other Git provider account
- ADT (Eclipse) for ABAP Cloud or SE80/SE38 for classic ABAP
Installation on On-Premise Systems
Step 1: Download abapGit Report
The latest version can be found at github.com/abapGit/abapGit.
- Navigate to Releases
- Download the file
zabapgit_standalone.prog.abap
Step 2: Create Report in SAP System
" Transaction SE38 or SE80" Create new report: ZABAPGIT_STANDALONE" Or: ZABAPGIT (if you want to install the full package)- Open SE38 (ABAP Editor)
- Create a new report:
ZABAPGIT_STANDALONE - Copy the complete code from the downloaded file
- Activate the report
Step 3: First Execution
" Start the reportREPORT zabapgit_standalone.On first start, you’ll be prompted to:
- Install SSL certificates (for HTTPS connections)
- Configure proxy settings (if applicable)
Installation in ABAP Cloud (SAP BTP)
In ABAP Cloud, the situation is different: abapGit cannot be installed directly, since there’s no access to SE38/SE80. Instead, there are two alternatives:
Option 1: abapGit for Eclipse (ADT Plugin)
- Open Eclipse with ADT
- Go to Help -> Install New Software
- Add the update site:
https://eclipse.abapgit.org/updatesite/ - Install abapGit for ABAP Development Tools
- Restart Eclipse
Option 2: abapGit Repository Interface (from SAP BTP ABAP Environment 2302)
SAP provides a native repository interface:
- Open ADT
- Right-click on your ABAP Cloud project
- Configure -> Link ABAP Repository to Git
This integration is still under development but offers native SAP support.
Git Provider Configuration
Set up SSH Key (recommended)
For secure communication with GitHub/GitLab:
# Generate SSH key (on your local machine)
# Display public keycat ~/.ssh/id_ed25519.pubAdd the public key to your Git provider under Settings -> SSH Keys.
Personal Access Token (Alternative)
For HTTPS access:
- GitHub: Settings -> Developer Settings -> Personal Access Tokens
- GitLab: Preferences -> Access Tokens
- Create token with
repopermission - Use token as password in abapGit
Basic Workflows
Clone Repository
The first step is cloning an existing repository into your SAP system.
In abapGit Standalone:
- Start
ZABAPGIT_STANDALONE - Click on + Clone
- Enter the repository URL:
https://github.com/username/repo.git - Select the target package (e.g.,
ZABAP_GIT_DEMO) - Click Clone
In ADT (Eclipse):
- Open the view abapGit Repositories (Window -> Show View)
- Click on + (Link Repository)
- Select your ABAP project and enter the URL
- Select or create a package
Stage Changes
After editing ABAP objects, changes must be prepared for commit:
- Open abapGit
- Select your repository
- Click Stage
- You’ll see a list of all changed objects
- Select the objects you want to commit
Typical View:
Changes:[x] ZCL_MY_CLASS (Modified)[x] ZIF_MY_INTERFACE (Modified)[ ] ZCL_TEST_CLASS (Modified) <- Don't commit[x] ZABAP_PROGRAM (New)Create Commit
A commit saves your changes in the Git history.
Best Practices for Commit Messages:
feat: Implemented new validation for customer number
- Check for valid customer number in ZCL_CUSTOMER_VALIDATION- Added unit tests for edge cases- Localized error message (DE/EN)
Refs: JIRA-1234Conventions:
feat:New functionalityfix:Bug fixrefactor:Code refactoring without functional changedocs:Documentationtest:Tests added or corrected
Push to Remote
After the commit, changes must be pushed to the remote repository:
- Click Push
- Authenticate (SSH key or token)
- Confirm the push
Pushing to origin/main...3 objects pushed successfullyPull from Remote
To get changes from other developers:
- Click Pull
- abapGit compares remote and local versions
- For conflicts: Manual resolution required
Caution: Pull overwrites local objects! Save your changes first.
Integration with GitHub and GitLab
Set up GitHub Repository
Step 1: Create New Repository
# On github.com or via CLIgh repo create my-abap-project --privateStep 2: Understand Repository Structure
abapGit creates a standardized folder structure:
my-abap-project/├── src/│ ├── zcl_my_class.clas.abap│ ├── zcl_my_class.clas.locals_def.abap│ ├── zcl_my_class.clas.locals_imp.abap│ ├── zcl_my_class.clas.testclasses.abap│ ├── zcl_my_class.clas.xml│ ├── zif_my_interface.intf.abap│ ├── zif_my_interface.intf.xml│ └── zmy_program.prog.abap├── .abapgit.xml└── README.mdFile Conventions:
.clas.abap- Class implementation.clas.locals_def.abap- Local types/constants.clas.locals_imp.abap- Local classes.clas.testclasses.abap- ABAP Unit tests.intf.abap- Interface definition.prog.abap- Program/Report.xml- Metadata (package, description, etc.)
GitLab Integration
GitLab works identically to GitHub. Important differences:
# GitLab Repository URLhttps://gitlab.com/username/my-abap-project.git
# GitLab Personal Access TokenPreferences -> Access Tokens -> Scope: api, read_repository, write_repositoryAzure DevOps Integration
For Microsoft environments:
# Azure DevOps Repository URLhttps://dev.azure.com/organization/project/_git/repository
# Personal Access TokenUser Settings -> Personal Access Tokens -> Scope: Code (Read & Write)Code Snippets for Typical Scenarios
Scenario 1: Initialize New Project
" 1. Create a new package in SE80/ADT" Package: ZABAP_GIT_DEMO" Transport request: Local (for development)
" 2. Create initial objectsCLASS zcl_demo_application DEFINITION PUBLIC FINAL CREATE PUBLIC. PUBLIC SECTION. INTERFACES if_oo_adt_classrun.ENDCLASS.
CLASS zcl_demo_application IMPLEMENTATION. METHOD if_oo_adt_classrun~main. out->write( 'Hello from abapGit managed project!' ). ENDMETHOD.ENDCLASS.
" 3. In abapGit: Link repository and make first commitScenario 2: Feature Branch Workflow
# On your local machine (after clone)git checkout -b feature/new-validation
# Or directly in abapGit:# 1. Repository -> Settings -> Default Branch# 2. Manually switch branch before pullIn the SAP system:
- Pull the new branch
- Develop your feature
- Stage and commit
- Push to feature branch
- Create pull request on GitHub/GitLab
Scenario 3: Conflict Resolution
When two developers have changed the same class:
" File: zcl_shared_class.clas.abap
" <<<<<<< HEAD (your change)METHOD calculate_total. rv_result = iv_quantity * iv_price * ( 1 - iv_discount ).ENDMETHOD." =======" >>>>>>> origin/main (remote change)METHOD calculate_total. rv_result = iv_quantity * iv_price. rv_result = rv_result - ( rv_result * iv_discount / 100 ).ENDMETHOD.Solution:
- Decide which version is correct (or combine both)
- Remove the conflict markers
- Test the change
- Commit and push
Scenario 4: Configure .abapgit.xml
The project configuration is stored in .abapgit.xml:
<?xml version="1.0" encoding="utf-8"?><asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"> <asx:values> <DATA> <MASTER_LANGUAGE>E</MASTER_LANGUAGE> <STARTING_FOLDER>/src/</STARTING_FOLDER> <FOLDER_LOGIC>PREFIX</FOLDER_LOGIC> <IGNORE> <item>/.gitignore</item> <item>/LICENSE</item> <item>/README.md</item> <item>/.github/</item> </IGNORE> </DATA> </asx:values></asx:abap>Important Settings:
MASTER_LANGUAGE: D for German, E for EnglishFOLDER_LOGIC: PREFIX (recommended) or FULLIGNORE: Files that are not imported into the SAP system
Best Practices for Team Work
1. Define Branching Strategy
Recommended Model for ABAP Projects:
main (or master)├── develop│ ├── feature/US-001-create-customer│ ├── feature/US-002-material-search│ └── bugfix/FIX-042-price-calculation└── release/1.0.0Rules:
main: Only stable, tested releasesdevelop: Integration of all featuresfeature/*: One branch per user storybugfix/*: Quick bug fixesrelease/*: Release candidates
2. Establish Pull Request Workflow
- Develop feature in own branch
- Create pull request on GitHub/GitLab
- Code review by at least one colleague
- CI/CD checks (syntax, ABAP unit tests)
- Merge after approval
- Delete branch after merge
3. Code Review Checklist for ABAP
## ABAP Code Review Checklist
### Functionality- [ ] Does the code meet the requirements?- [ ] Are edge cases handled?
### Code Quality- [ ] Clean ABAP principles followed?- [ ] Meaningful variable names?- [ ] No magic numbers?
### Performance- [ ] No SELECT * without restriction?- [ ] Correct index usage?- [ ] Bulk operations where possible?
### Tests- [ ] Unit tests present?- [ ] Sufficient test coverage?
### Documentation- [ ] Public methods documented?- [ ] Complex logic explained?4. Follow Commit Conventions
Use Conventional Commits for consistent history:
<type>(<scope>): <subject>
<body>
<footer>Examples:
feat(customer): Validation for international customer numbers
- Implemented ISO 3166-1 country code check- VAT-ID validation for EU customers- Unit tests for all country variants
Closes #42fix(pricing): Division by zero with 0% discount
The price calculation broke when a discount of 0%was specified. Now the case is handled correctly.
Fixes #575. .gitignore for ABAP Projects
Create a sensible .gitignore:
# OS-specific files.DS_StoreThumbs.db
# IDE files.idea/*.iml
# Local configuration.local/
# Generated files*.log6. Documentation in Repository
README.md Template:
# Project: Customer Management Extension
## OverviewThis repository contains custom extensions for the SD module.
## Installation1. Clone the repository into package `ZCUSTOMER_EXT`2. Activate all objects3. Run the setup report `ZCUSTOMER_SETUP`
## Dependencies- SAP S/4HANA 2023 or higher- Package `ZABAP_UTILS` (see other repo)
## Development1. Create feature branch2. Implement changes3. Add unit tests4. Create pull request
## ContactMaintainer: [email protected]Troubleshooting
Problem: SSL Certificate Error
Error: SSL certificate problem: unable to get local issuer certificateSolution:
- Open transaction
STRUST - SSL Client Standard -> Add certificate
- Import GitHub/GitLab root certificate
Problem: Proxy Connection Error
Error: Could not connect to proxySolution: In abapGit -> Settings -> Proxy:
Proxy Host: proxy.company.comProxy Port: 8080Bypass: localhost,*.intranet.company.comProblem: Object Cannot Be Deserialized
Error: Object ZCL_EXAMPLE could not be deserializedPossible Causes:
- Missing dependencies (other classes/interfaces)
- Incompatible SAP version
- Corrupt XML metadata
Solution:
- Import dependencies first
- Check and correct
.xmlfile if necessary - In emergency: Create object manually, then repeat pull
Problem: Push Rejected
Error: rejected - non-fast-forwardSolution:
# Locally: Fetch changes and rebasegit pull --rebase origin main
# In abapGit: First pull, then resolve conflicts, then pushConclusion
abapGit revolutionizes ABAP development by bringing modern version control to the SAP world. The key takeaways:
- abapGit is essential for professional ABAP development
- Git workflows (branching, pull requests) work with ABAP too
- Team collaboration is massively improved through code reviews
- Backup and portability - your code belongs to you, not the SAP system
Next Steps:
- Install abapGit (standalone or ADT plugin)
- Clone or create first repository
- Establish feature branch workflow in team
- Introduce code reviews via pull requests
Further Reading
- gCTS & CI/CD in ABAP Cloud - Enterprise DevOps pipeline
- Clean ABAP: Rules and Best Practices - Code quality
- ABAP Cloud Certification 2026 - Career boost
- ABAP Cloud on BTP Trial - Start for free