Skip to Content

Commit your project to Git and deploy to the cloud

By Jim Jaquet

Create a git repository for your project, add your project files and then deploy your app on SAP Cloud Platform

You will learn

You will create a Git repository in SAP Cloud Platform for your project, commit your project files, and then deploy and your app to the cloud. You will be able to access your app from a laptop and your mobile device.


Step 1: Log into your SAP Cloud Platform account

Log into SAP Cloud Platform by opening the following URL in a new tab:

Make sure you are using the Europe (Trial) landscape, and click on your account name to open the cockpit view.

In the left-hand navigation bar, select Repositories > Git Repositories.

Git Repositories
Step 2: Create new repository

Click on New Repository, and enter the following details:

Field Value
Repository Name te2016
Description Repository for Partner Contacts app

Make sure the Create empty commit box is checked, click OK and your repository will be created.

Create repo image
Step 3: Open the repository overview page

Click on the te2016 repository link to open the repository overview page.

Created repo
Step 4: Copy the Git Repository URL

On the repository overview page, copy the Git Repository URL:

Git repo URL
Step 5: Initialize Local Repository

Open SAP Web IDE in a browser window (or in an existing one), right-click on your te2016 project folder and select Git > Initialize Local Repository.

Initialize local git

An alert box will appear in the upper right corner of your SAP Web IDE window.

Initialized local git alert
Step 6: Link to remote repository

Click the Set Remote link in the alert and paste in the Git Repository URL you copied earlier. You can leave the Add configuration for Gerrit unchecked and click OK.

This will initialize your local repository and link it to the Git repository in HCP.

Initialize with remote git URL
Step 7: Open the Git pane

Click on the Git pane icon on the right hand side bar of the SAP Web IDE window.

If your project does not appear in the Git pane, keep the Git pane open and click on the project folder.

Git pane
Step 8: Perform a Git Fetch

To allow SAP Web IDE to see remote branches in the SAP Cloud Platform Git repository, click the Fetch button on the Git pane and log in with your email address and SAP Cloud Platform account password if prompted.

When the Changes Fetched dialog box opens, click OK.

Git Fetch
Step 9: Perform a Git Merge

Click the Merge button on the Git pane to merge your local branch to the remote origin/master branch.

When the Merge “master” dialog box opens, make sure the origin/master remote branch is selected and click OK.

Git MergeGit Merge master

At this point your Git repository is set up.

The next steps will commit and push your project files to the repository.

Step 10: Stage files

You may select individual files to commit, but to commit all project files, click the Stage All checkbox.

staging all files
Step 11: Enter a description for the commit

Scroll down in the Git pane and enter a description (required for any commits) like Initial commit.

commit description
Step 12: Perform a Git Commit and Push

Click on the Commit and Push button, and select Remote Branch, from the pop up menu.

This will add your files to the master branch (in other source control systems this is sometimes referred to as the “trunk”).

commit and push
Step 13: Push changes to the remote branch

In the Push Changes to a remote branch dialog box, select origin/master, click OK and log in with your SAP Cloud Platform credentials if prompted.

select origin master
Step 14: New file decorations

You will see a confirmation alert appear briefly in the top-right corner of the Web IDE window (just below Logout), and you will see the decorations change to the green circles indicating that the files in your project match the versions in the Git repository.

green dots
Step 15: Deploy app on HCP

Deploying your app, is very simple.

Right-click on your te2016 project folder, and select Deploy > Deploy to SAP Cloud Platform.

deploy to SAP Cloud Platformmenu
Step 16: Log in

Log in with your account number, email and password.

log in
Step 17: Deployment dialog box

In the Deploy Application to SAP Cloud Platform dialog box, confirm that Deploy a new application, and the Activate checkbox are both selected. Click Deploy.

deploy app options
Step 18: Open the active version of your app

In the Successfully Deployed confirmation dialog, click the Open the active version of the application link to launch your app.

successful deployment
Step 19: App deployed and running

Your app, running on SAP Cloud Platform, will open in a new tab.

You can enter the URL in your phone and see it running there as well. Since the URL is fairly long, you can email it to yourself and click the link in your email.

deployed app

Next Steps

Updated 09/13/2017

Time to Complete

10 Min.



Back to top