-
clone the repo:
git clone https://github.com/ekergy/priceprofor
-
Now change the name of the remote host
git remote rename origin github
Remember to check the remote github workflow.
-
clone the repo:
git clone https://github.com/ekergy/priceprofor
-
Now change the name of the remote host
git remote rename origin github
-
Now create the remote for openshift (needs to configure your id_rsa.pub to the openshift account):
git remote add openshift ssh://542bc3bb4382ec4e520010a0@priceprofor-ekergy.rhcloud.com/~/git/priceprofor.git/
To kept github and openshift repos sync we will use the remote push-only strategy:
-
Add a new remote (with name all) using github as base:
git remote add all https://github.com/ekergy/priceprofor
-
Configure a push url for all:
git remote set-url --add --push all https://github.com/ekergy/priceprofor
-
Configure the other push only url for all:
git remote set-url --add --push all ssh://542bc3bb4382ec4e520010a0@priceprofor-ekergy.rhcloud.com/~/git/priceprofor.git/
And you are set to go. To check our config run git remote -v
and you should get:
all https://github.com/ekergy/priceprofor (fetch)
all https://github.com/ekergy/priceprofor (push)
all ssh://542bc3bb4382ec4e520010a0@priceprofor-ekergy.rhcloud.com/~/git/priceprofor.git/ (push)
github https://github.com/ekergy/priceprofor (fetch)
github https://github.com/ekergy/priceprofor (push)
openshift ssh://542bc3bb4382ec4e520010a0@priceprofor-ekergy.rhcloud.com/~/git/priceprofor.git/ (fetch)
openshift ssh://542bc3bb4382ec4e520010a0@priceprofor-ekergy.rhcloud.com/~/git/priceprofor.git/ (push)
Remember to check the remote all/openshift workflow.
- Soy un desarrollador standard y quiero contribuir para el proyecto:
quiero partir del ultimo que haya en el repositorio:
git fetch github
y tambien ignorar todas las modificaciones que tenga en mi repositorio y fichero en local:git reset github/master
git reset --hard github/master
- Vale pues he terminado mi desarrollos y hago commit a mis modificaciones:
y ahora actualizo openshift y github con mis cambios:
git commit -a -m"mi mensage"
y me voy a casa a descansar.git push openshift -f
- Voy iniciar trabajo con el proyecto:
y ademas quiero partir del ultimo que haya en el repositorio:
git fetch all
y tambien ignorar todas las modificaciones que tenga en mi repositorio y fichero en local:git reset all/master
git reset --hard all/master
- Vale pues he terminado mi desarrollos y hago commit a mis modificaciones:
y ahora actualizo openshift y github con mis cambios:
git commit -a -m"mi mensage"
y me voy a casa a descansar.git push all -f
- Hay un problem con el repo y el código solamente en openshift:
quiero partir del ultimo que haya en el repositorio:
git fetch openshift
y tambien ignorar todas las modificaciones que tenga en mi repositorio y fichero en local:git reset openshift/master
git reset --hard openshift/master
- Vale pues he terminado mi desarrollos y hago commit a mis modificaciones:
y ahora actualizo openshift y github con mis cambios:
git commit -a -m"mi mensage"
y me voy a casa a descansar.git push openshift -f