问题
I've created a project on Red Hat openshift now i want to know about how can i connect it with my bit-bucket account to maintain and handle my openshift Project with bit-bucket
回答1:
Clone your current repo to your computer,
git clone {{ ssh:source_code }}
The source code URL is available in the app console (under source code) ex:
git clone ssh://555065b53433ca08f100001b@appname-domain.rhcloud.com/~/git/example.git/
log in to bitbucket, create a new repo, with type as git
.
navigate your terminal to the cloned repo,
Adding remote to the cloned repo
git remote add bitbucket https://username@bitbucket.org/username/reponame.git
To push the changes to the remote repo on bitbucket
,
git push bitbucket { branch }
example:
git push bitbucket master
To push the changes to OpenShift repo,
git push origin {branch}
来源:https://stackoverflow.com/questions/30262990/how-can-i-connect-openshift-git-repository-to-bitbucket