---
parser: v2
auto_validation: true
primary_tag: software-product>sap-btp--abap-environment
tags: [  tutorial>beginner, programming-tool>abap-development, software-product>sap-business-technology-platform]
time: 10
author_name: Merve Temel
author_profile: https://github.com/mervey45
slug: abap-environment-abapgit-transfer
canonical_url: https://developers.sap.com/tutorials/abap-environment-abapgit-transfer
---

# Push Your ABAP Source Code from SAP BTP, ABAP Environment to a GitHub Repository using abapGit
<!-- description --> Push Your ABAP Source Code from a SAP BTP, ABAP environment instance to a GitHub repository using the ADT plugin for abapGit.

## Prerequisites  
- You need an SAP BTP, ABAP environment [trial user](abap-environment-trial-onboarding) or a license.
- You have installed the [`abapGit` plugin](abap-install-abapgit-plugin).
- Generate a personal access token in GitHub, [here](https://github.com/settings/tokens)

 
## You will learn  
- How to create or adapt source code in ABAP instance
- How to open `abapGit` repositories
- How to stage and commit ABAP development objects

---
### Create or adapt source code in ABAP instance


  1.  Open **ABAP Development Tools** and logon to your ABAP system.

      Add ABAP development object to your already existing package **`TESTABAPGIT`** (e.g. ABAP class).

      Therefore right-click on **Classes** and select **New ABAP Class**.

      ![create](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/create.png)

  2. Create a **package**:
      - Name: **`Z_Class_YYY`**
      - Description: **new class**

      ![create](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/create2.png)

       Click **Next >**.

  3. Click **Finish**

      ![create](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/create3.png)

  4. Implement your newly created class.

      ![create](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/create4.png)

     **Save and activate**.



### Open abapGit repositories


  1. Log in to your **GitHub repository**, select your **folder**, click **Code** and copy the HTTP link for later use.

   ![open](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/git.png)

  2. Go back to **Eclipse**. Select your **ABAP system** in the Project Explorer and select **Windows** > **Show View** > **Other** to open the `abapGit` repositories.

      ![open](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/create5.png)

  3. Search for **`abapGit repositories`**, select it and click **Open**.

      ![open](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/create6.png)

  4. In your **`abapGit` repositories** ab, click the **`+`** symbol.

      ![open](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/git2.png)

  5. Enter your git repository URL from earlier and click **Next >**.

      ![open](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/git3.png)

  6. Enter following information:
     - URL: `<your_git_repository_url>`
     - User: `<your_git_repository_email_address>`
     - Password: `<your_git_repository_password>`

      ![open](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/git4.png)

      Click **Next >** and **Finish**.


### Stage and commit ABAP development objects


  1. Right-click on your package **`TESTABAPGIT`** and click **Stage and Push**.

      ![object](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/object.png)

  2. Enter your repository credentials in the popup and click **OK**.

      ![object](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/object2.png)

  3. In the staging view you will see a list of changed, created or deleted ABAP development objects which can be transferred to your repository. Furthermore the icon of the respective file indicated whether a file was created, modified or deleted.

      ![object](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/object3.png)

  4. ABAP development objects which should staged can be selected by drag and drop from the `unstaged` box to the staged box or by clicking on the + button.

      ![object](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/object4.png)

  5. Enter your commit message and click **Commit and Push**.

      ![object](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/object6.png)

  6. Click **OK**.

      ![object](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/object8.png)

  7. Check your result.

      ![object](https://raw.githubusercontent.com/sap-tutorials/abap-core-development/main/tutorials/abap-environment-abapgit-transfer/object9.png)

   The staged objects are transferred to your repository.

### Test yourself



---
