OpenShift ให้บริการ Git Repository ทำหน้าที่เก็บ source code ของ application หากต้องการใช้ private Git repository ร่วมด้วย เราก็สามารถใช้คุณสมบัติของ Git ได้ โดยการเพิ่ม remote repository เป็น openshift แล้ว push โค้ดขึ้นไปยัง remote repository นั้น ยกตัวอย่าง PHPMailer ให้ clone repository ลงมาก่อนดังนี้
git clone https://github.com/PHPMailer/PHPMailer.git
เข้าไปที่ไดเร็กทอรี่ด้วยคำสั่ง
cd PHPMailer
จากนั้นเพิ่ม Remote Repository ด้วยคำสั่ง
git remote add openshift -f openshift-git-repo-url
โดยทำการเปลี่ยนค่า openshift-git-repo-url เป็น SSH URL ของแอปพลิเคชันบน Openshift ที่ต้องการ เช่น
git remote add openshift –f ssh://5436e0014382ec2998000ed3@basicphp-tomsonfoxoss.rhcloud.com/~/git/basicphp.git/
ทำการ Merge ด้วยคำสั่ง
git merge openshift/master -s recursive -X ours
ทำการ Push ด้วยคำสั่ง
git push openshift master
เท่านี้เราก็สามารถใช้งาน external git repository ร่วมกับ OpenShift ได้แล้ว