create Command
Create a new abapGit online repository in the ABAP system.
Command
abapgit-agent create
Prerequisite
initcommand has been run successfully.abapGitAgentfile exists with credentials (host, user, password, gitUsername, gitPassword)- Current folder is git repo root
What It Does
- Detect git remote - Gets URL from
git remote get-url origin - Get package - Reads from
.abapGitAgent - Get folder - Reads from
.abapGitAgent(default:/src/) - Get folder logic - Reads from
.abapGitAgent(default:PREFIX) - Create repository - Calls ABAP REST API to create online repository with folder logic setting
- Set starting folder - Configures the folder path in repository settings
Parameters
None. The command auto-detects all settings from:
- Git remote URL
.abapGitAgentconfiguration
Output
Success
🚀 Creating online repository
URL: https://github.com/org/repo.git
Package: AUD_TAG
Folder: /abap/
Folder Logic: PREFIX
Name: abgagt-import
Branch: main
✅ Repository created successfully!
URL: https://github.com/org/repo.git
Package: AUD_TAG
Name: abgagt-import
Next steps:
abapgit-agent import
Error - Repository Already Exists
❌ Failed to create repository
Error: Repository already exists
Error - Missing Configuration
❌ Failed to create repository
Error: Package not configured
Post-Create Steps
After creating the repository:
# Import objects from ABAP package to git
abapgit-agent import
# Push to git
git push origin main
# Activate in ABAP
abapgit-agent pull
Full Workflow
1. abapgit-agent init --folder /src/ --package ZMY_PACKAGE
└─> Creates .abapGitAgent, CLAUDE.md, /src/, updates .gitignore
2. Edit .abapGitAgent (host, user, password, gitUsername, gitPassword)
3. abapgit-agent create
└─> Creates online repository in ABAP
4. abapgit-agent import
└─> Stages, commits, and pushes all objects from ZMY_PACKAGE
5. git pull
└─> Optionally pull to local folder
6. abapgit-agent pull
└─> Activate objects in ABAP
Example
# Initialize
abapgit-agent init --folder /src/ --package ZMYPROJECT
# Edit config
vim .abapGitAgent
# Create repo in ABAP
abapgit-agent create
# Import objects to git
abapgit-agent import
# Pull to local folder
git pull origin main
# Activate in ABAP
abapgit-agent pull