Skip to content

Instantly share code, notes, and snippets.

@Lazhari
Created November 18, 2015 12:02
Show Gist options
  • Save Lazhari/58d2f286dc1a539374fa to your computer and use it in GitHub Desktop.
Save Lazhari/58d2f286dc1a539374fa to your computer and use it in GitHub Desktop.
Use Bitbucket repo with openshift
  1. Clone your repository
$ git clone <bitbucket-repo-url>
  1. Add the remote origin for openshift

Your local clone has then your other repo (bitbucket etc.) as remote repo. Your remote repo is stored with the alias "origin" (the default alias used by git if you clone). You then add the openshift repo as remote to your clone. You do that while explicitly using an alias for the remote repo you add - I'm using "openshift" as alias here:

$ git remote add openshift -f <openshift-git-repo-url>
  1. Merge your openshift repo with your local bitbucket clone
$ git merge openshift/master -s recursive -X ours

With this command you tell git to merge the master branch in the openshift git repo with your local git repo. You tell it to merge using the recursive merging strategy and to choose your ("ours") version when there are conflicts.

  1. Finaly push your git repo to openshift
$ git push openshift HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment