Hi @Ayyaparaja ,
Yes, you can absolutely push ABAP code directly from Eclipse ADT to a GitHub repository. Based on the plugins you've installed, the correct tool for this is the abapGit plugin for ADT.
Here is a comprehensive guide to help you link your repository and manage your code.
Prerequisites in GitHub
Before you begin in ADT, please complete the following steps in GitHub:
- Create a New Repository: If you haven't already, create a new repository. It is recommended to initialize it with a README.md file. This ensures that a default branch (e.g., main or master) is created, which is required for the initial linking process in ADT.
- Copy the Repository URL: Copy the HTTPS URL of your repository. You will need this to link it within ADT.
- Generate a Personal Access Token (PAT): If you are connecting to a private repository on github.com or an internal company instance (like github.tools.sap), you must generate a Personal Access Token. This token will be used instead of your password for authentication from ADT. Ensure the token has the necessary scopes (e.g., repo) to allow read and write access to the repository.
Linking Your Repository in ADT
Follow these steps to link your local ABAP package to the remote Git repository:
- Open the abapGit Repositories View: In ADT, use the shortcut Ctrl+3 (for Windows) or Cmd+3 (for macOS) and type abapGit Repositories to open the view. This view lists all the repository links set up in your ABAP system.
- Initiate a New Repository Link: In the top-right corner of the "abapGit Repositories" view, click the +
(Add) icon. This will start the process to link a new remote repository to an ABAP package
Please Note: This "linking" step does not clone or pull any code. It simply establishes a persistent connection between a specific ABAP package and a specific branch of your Git repository. The current architecture permits a one-to-one relationship; one package can be linked to only one repository branch at a time.
Complete the "Link Repository" Wizard:
- Repository URL: On the first page of the wizard, paste the repository URL you copied from GitHub.
- Authentication: If the repository is private or on an internal enterprise server, you will be prompted for credentials. Enter your GitHub username and use the Personal Access Token (PAT) you generated as your password.
- Branch and Package Selection: Choose the specific repository Branch you want to work with and select the ABAP Package you wish to link it to. All Git operations, such as pulling and pushing, will be performed between this selected pair.
- Initial Pull Option: If you are linking a repository for the first time to an empty package, it is recommended to uncheck the "Pull after link" option to maintain clear separation of steps. You can perform a pull manually later.
- Folder Logic Selection: The next page defines the "Folder Logic." This crucial setting determines the folder structure of your ABAP objects within the Git repository.
FULL: Creates a folder structure that mirrors the ABAP object hierarchy (e.g., /src/zcl_my_class.clas.abap). This is a common and intuitive choice.
PREFIX: Uses the package name as a top-level folder for all objects.
NAMESPACE: Uses the SAP namespace (e.g., /0CUST/) as the top-level folder.
Choose the logic that best suits your project's standards. For most use cases, FULL is recommended. - Finalize the Link: After selecting the folder logic, click Finish. Your ABAP package and Git repository branch are now successfully linked.
Performing Git Operations
Once the link is established, you can perform standard Git operations from the context menu of the linked repository.

For Pulling Changes from the Repository
If the remote repository contains objects that are not yet in your ABAP system, you can pull them.
- Right-click on the linked repository in the "abapGit Repositories" view and select "Pull".
- The wizard will connect to the remote repository and show you a list of ABAP objects that are available to be imported.
- Select the objects you wish to import into your package.
- Click Continue and then Finish to complete the pull process. The selected objects will be created or updated in your ABAP system.
For Pushing Your Changes to the Repository
- After making changes to ABAP objects within your linked package, right-click on the repository link and choose the Stage and Push option.
- This action will open the "abapGit Staging" view. This view displays all modified, created, or deleted objects (both code and non-code files) in your local package that differ from the current state of the repository branch.
- Select the changes you wish to commit. You can add individual files or all changes to the "Staged Changes" area by using the + icon.
- In the "Commit Message" box, write a clear and concise message describing the changes you are pushing.
- Once you have staged your desired files and written a commit message, click the Commit and Push button to transfer your changes to the remote GitHub repository.
Please let me know if there is any other information I can help you with.
Thanks,
Aarnav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.