¿Cómo obtener una sucursal en el enchufe de otra persona en github?
Me separé de repo en github. Quiero obtener el código de una rama a otro enchufe personalizado.
¿Debo clonar este usuario de repo en su totalidad en un repositorio local separado o puedo hacer algo como git checkout link_to_the_other_users_branch
?
76
06 февр. establecido por Christian el 6 de febrero 2012-02-06 01:18 '12 a la 1:18 2012-02-06 01:18
@ 2 respuestas
$ git remote add theirusername git@github.com:theirusername/reponame.git $ git fetch theirusername $ git checkout -b mynamefortheirbranch theirusername/theirbranch
Tenga en cuenta que hay varios URI "correctos" que puede usar para el control remoto cuando lo agrega en el primer paso.
-
git@github.com:theirusername/reponame.git
es un URI basado en SSH -
https://github.com/theirusername/reponame.git
es el URI de HTTP
Cuál prefieres usar dependerá de tu situación: GitHub tiene un artículo de ayuda que explica la diferencia y te ayuda a elegir: ¿Qué URL remota debo usar?
135
06 февр. la respuesta es dada por amalloy 06 feb. 2012-02-06 01:35 '12 a la 1:35 2012-02-06 01:35
La frase amalloy no me ayudó. Sucedió
git remote add theirusername https://github.com/theirusernam/reponame git fetch theirusername git checkout -b mynamefortheirbranch theirusername/theirbranch

Recursos
11
07 июня '16 в 21:34 2016-06-07 21:34 La respuesta es dada por Mateusz Piotrowski el 7 de junio de 2016 a las 21:34 2016-06-07 21:34