Actualmente estoy trabajando de la siguiente manera, sé que hay mejores.
Existe una rama local 'master' y otra 'mi-rama', la idea es que yo trabaje localmente en 'mi-rama' y luego suba los cambios a 'mi-rama' remota.
Resumen: existe 'mi-rama' tanto en local como en remoto, y 'master' en local y remoto.
Yo tengo que mantener 'master' y 'mi-rama' locales actualizados con 'master' remoto y he intentado hacer lo siguiente:
git checkout mi-rama
git fetch origin
git pull origin master
El objetivo era actualizar 'mi-rama' con 'master remoto', luego iba repetir el proceso pero cambiando la primera parte por: git checkout master
He recibido el siguiente mensaje de advertencia:
admin@Admins-iMac project % git pull origin master
Enter passphrase for key '/Users/admin/.ssh/id_rsa':
From bitbucket.org:project/project
* branch master -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
Me gustaría saber que ha pasado, porque ha pasado, que he hecho mal y cuáles son los siguientes pasos sin perder los cambios que he aplicado en 'mi-rama' local.