$npx -y skills add likweitan/abap-skills --skill abapgitHelp with abapGit workflows including repository setup, cloning, serialization, branching strategies, transport-vs-git workflows, CI/CD integration, and .abapgit.xml configuration. Use when users ask about abapGit, git for ABAP, ABAP version control, abapGit clone, abapGit pull,
| 1 | # abapGit Workflows |
| 2 | |
| 3 | Guide for managing ABAP development objects in Git repositories using abapGit. |
| 4 | |
| 5 | ## Workflow |
| 6 | |
| 7 | 1. **Determine the user's goal**: |
| 8 | - Setting up abapGit for the first time |
| 9 | - Cloning an existing repository |
| 10 | - Pushing ABAP code to a Git repository |
| 11 | - Configuring branching or transport strategies |
| 12 | - Setting up CI/CD pipelines for ABAP |
| 13 | - Troubleshooting abapGit issues |
| 14 | |
| 15 | 2. **Identify the environment**: |
| 16 | - On-premise SAP system with abapGit standalone |
| 17 | - SAP BTP ABAP Environment (abapGit integration in ADT) |
| 18 | - gCTS (Git-enabled Change and Transport System) |
| 19 | |
| 20 | 3. **Guide implementation** with best practices for ABAP-specific Git workflows |
| 21 | |
| 22 | ## abapGit Overview |
| 23 | |
| 24 | | Aspect | Description | |
| 25 | | --------------------- | ----------------------------------------------------------------- | |
| 26 | | **What** | Open-source Git client for ABAP, runs inside the SAP system | |
| 27 | | **Serialization** | Converts ABAP objects to file-based format for Git storage | |
| 28 | | **Deserialization** | Imports file-based format back into ABAP objects in the system | |
| 29 | | **Supported Objects** | Classes, interfaces, CDS, function groups, programs, tables, etc. | |
| 30 | | **Installation** | Via abapGit standalone report or Eclipse plugin | |
| 31 | |
| 32 | ## Setup |
| 33 | |
| 34 | ### Installing abapGit Standalone (On-Premise) |
| 35 | |
| 36 | 1. Create report `ZABAPGIT_STANDALONE` or `ZABAPGIT_FULL` |
| 37 | 2. Download latest version from https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap |
| 38 | 3. Copy content into the report and activate |
| 39 | 4. Run the report via `SE38` or transaction `ZABAPGIT` |
| 40 | |
| 41 | ### abapGit in ADT (BTP ABAP Environment) |
| 42 | |
| 43 | 1. In ADT: **Window → Show View → Other → abapGit Repositories** |
| 44 | 2. Link repository using HTTPS URL |
| 45 | 3. Requires communication arrangement for Git service |
| 46 | |
| 47 | ### SSL Certificates |
| 48 | |
| 49 | - Download GitHub/GitLab root certificates |
| 50 | - Import via `STRUST` (transaction) → SSL Client (Anonymous) or (Standard) |
| 51 | - Required for HTTPS connections to Git providers |
| 52 | |
| 53 | ## Core Operations |
| 54 | |
| 55 | ### Clone a Repository |
| 56 | |
| 57 | ``` |
| 58 | 1. Open abapGit (standalone or ADT) |
| 59 | 2. Click "+ Clone" / "Link abapGit Repository" |
| 60 | 3. Enter repository URL (HTTPS) |
| 61 | 4. Select target package (create if needed) |
| 62 | 5. Select branch (default: main) |
| 63 | 6. Pull objects into the system |
| 64 | ``` |
| 65 | |
| 66 | ### Push Changes to Git |
| 67 | |
| 68 | ``` |
| 69 | 1. Stage changed objects (select what to include) |
| 70 | 2. Write a meaningful commit message |
| 71 | 3. Push to remote branch |
| 72 | 4. Resolve conflicts if any |
| 73 | ``` |
| 74 | |
| 75 | ### Pull Updates from Git |
| 76 | |
| 77 | ``` |
| 78 | 1. Open the repository in abapGit |
| 79 | 2. Click "Pull" |
| 80 | 3. Review incoming changes |
| 81 | 4. Activate pulled objects |
| 82 | ``` |
| 83 | |
| 84 | ## .abapgit.xml Configuration |
| 85 | |
| 86 | The `.abapgit.xml` file in the repository root controls serialization settings: |
| 87 | |
| 88 | ```xml |
| 89 | <?xml version="1.0" encoding="utf-8"?> |
| 90 | <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"> |
| 91 | <asx:values> |
| 92 | <DATA> |
| 93 | <MASTER_LANGUAGE>E</MASTER_LANGUAGE> |
| 94 | <STARTING_FOLDER>/src/</STARTING_FOLDER> |
| 95 | <FOLDER_LOGIC>PREFIX</FOLDER_LOGIC> |
| 96 | <IGNORE> |
| 97 | <item>/.gitignore</item> |
| 98 | <item>/LICENSE</item> |
| 99 | <item>/README.md</item> |
| 100 | <item>/package.json</item> |
| 101 | <item>/.travis.yml</item> |
| 102 | </IGNORE> |
| 103 | <REQUIREMENTS/> |
| 104 | </DATA> |
| 105 | </asx:values> |
| 106 | </asx:abap> |
| 107 | ``` |
| 108 | |
| 109 | ### Key Settings |
| 110 | |
| 111 | | Setting | Values | Description | |
| 112 | | ----------------- | ------------------- | ----------------------------------------------- | |
| 113 | | `MASTER_LANGUAGE` | `E`, `D`, etc. | Master language for texts | |
| 114 | | `STARTING_FOLDER` | `/src/` | Root folder for serialized objects | |
| 115 | | `FOLDER_LOGIC` | `PREFIX` / `FULL` | How package hierarchy maps to folders | |
| 116 | | `IGNORE` | File patterns | Files to exclude from deserialization | |
| 117 | | `REQUIREMENTS` | Software components | Dependencies that must be present before import | |
| 118 | |
| 119 | ### Folder Logic |
| 120 | |
| 121 | - **PREFIX**: Package name prefix is removed. `Z_PKG_SUB` under `Z_PKG` → `sub/` folder |
| 122 | - **FULL**: Full package name becomes folder. `Z_PKG_SUB` → `z_pkg_sub/` |
| 123 | |
| 124 | ## Branching Strategy |
| 125 | |
| 126 | ### Recommended: Trunk-Based for ABAP |
| 127 | |
| 128 | ``` |
| 129 | main (production-ready) |
| 130 | └── feature/add-validation |
| 131 | └── feature/new-report |
| 132 | └── bugfix/fix-calculation |
| 133 | ``` |
| 134 | |
| 135 | - Keep `main` branch stable a |