{"id":42016,"date":"2023-10-03T07:00:50","date_gmt":"2023-10-03T14:00:50","guid":{"rendered":"https:\/\/dhblog.dream.press\/blog\/?p=42016"},"modified":"2025-01-16T14:39:23","modified_gmt":"2025-01-16T22:39:23","slug":"comandos-git-ejemplos-aplicados","status":"publish","type":"post","link":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/","title":{"rendered":"Comandos Git: 21 Opciones Que Debes Conocer"},"content":{"rendered":"\n<p><span style=\"font-weight: 400;\">Cualquiera que use o conozca Git, sabe que hay t\u00e9rminos y modificadores a seguir.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Y debes mantenerte al tanto de todo, pues hoy en d\u00eda es un est\u00e1ndar en el control de versiones para productos tecnol\u00f3gicos.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Pero en vez de retenerlo todo en tu memoria, creamos esta gu\u00eda completa de recursos con comandos cr\u00edticos. As\u00ed tu uso de Git ser\u00e1 m\u00e1s efectivo y eficiente.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">\u00bfNo eres un superusuario de Git (a\u00fan)? Perfecto, no hay problema.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Los comandos que veremos van desde los cotidianos, hasta los raros y complejos. Y, como bono adicional, te daremos consejos de cada uno, sobre c\u00f3mo usarlos durante tus proyectos de desarrollo.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Comenzaremos hablando del trasfondo de Git, y luego haremos una descripci\u00f3n completa de c\u00f3mo usar Git en un entorno real.<\/span><\/p>\n\n\n\n<h2 id=\"h-pequeno-resumen-entendiendo-git-github-y-el-sistema-de-control-de-versiones\" class=\"wp-block-heading\"><b>Peque\u00f1o Resumen: Entendiendo Git, GitHub, y el Sistema de Control de Versiones<\/b><\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1600\" height=\"900\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/01_Git.jpg\" alt=\"Caracter\u00edsticas de Git.\" class=\"wp-image-42018 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/01_Git.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/01_Git-300x169.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/01_Git-1024x576.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/01_Git-768x432.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/01_Git-1536x864.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/01_Git-600x338.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/01_Git-1200x675.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/01_Git-730x411.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/01_Git-1460x821.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/01_Git-784x441.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/01_Git-1568x882.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/01_Git-877x493.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/900;\" \/><\/figure><\/div>\n\n\n<p><span style=\"font-weight: 400;\">Los desarrolladores definir\u00edan a <\/span><a href=\"https:\/\/git-scm.com\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Git<\/span><\/a><span style=\"font-weight: 400;\"> como a una plataforma de Gesti\u00f3n de C\u00f3digo Fuente (SCM, por Source Code Management). En otras palabras, es un sistema de control de versiones gratuito, f\u00e1cil de usar y que, por ende, est\u00e1 en el coraz\u00f3n de muchos proyectos conocidos.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Esto nos lleva a una pregunta muy l\u00f3gica, si no eres parte del mundo del desarrollo: \u00bfQu\u00e9 es un control de versiones?&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Crear algo a partir de c\u00f3digo a menudo, conlleva pruebas, errores y varios pasos. Y, en muchos casos, colaboraci\u00f3n.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Es muy f\u00e1cil sobreescribir o perder elementos importantes, que requirieron esfuerzo. Si has trabajado con colegas, en tiempo real, sobre un documento de Google, sabes qu\u00e9 se siente.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">B\u00e1sicamente, una herramienta de control de versiones guarda cada iteraci\u00f3n de tu progreso, durante los pasos de un proyecto. Esto es \u00fatil, en caso de que desees volver a una versi\u00f3n anterior para revisar elementos y reutilizarlos \u2014 o incluso, si quieres restaurar una versi\u00f3n m\u00e1s antigua de tu proyecto, si algo en su versi\u00f3n actual no funciona como deber\u00eda.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Git se instala localmente, lo que implica que existe en tu computador, en lugar de en la nube. Es m\u00e1s, \u00a1no necesitas conectarte a internet para usarlo!<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">As\u00ed, brinda un repositorio seguro (o \u201crepo\u201d, que es un espacio de almacenamiento para c\u00f3digo), para que los desarrolladores guarden cada borrador de los proyectos en que trabajan.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Git va m\u00e1s all\u00e1, gracias a su modelo de ramificaci\u00f3n que lo hizo tan conocido.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Con Git, un desarrollador puede crear diversas \u201cramas de c\u00f3digo\u201d que se extienden desde alg\u00fan proyecto. B\u00e1sicamente, son copias del proyecto principal, o proyecto <\/span><i><span style=\"font-weight: 400;\">master<\/span><\/i><span style=\"font-weight: 400;\">, pero el t\u00e9rmino gradualmente est\u00e1 siendo dejado de lado.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Los cambios en estas ramas, no impactan el c\u00f3digo del proyecto principal a menos que lo indiques. Con esta funci\u00f3n los desarrolladores pueden hacer cosas como experimentar con nuevas funcionalidades o solucionar bugs. Los cambios realizados en una rama, no impactar\u00e1n el c\u00f3digo principal a menos que hagas un \u201cmerge\u201d o fusi\u00f3n.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Git tiene mucho sentido para quienes trabajan en proyectos propios. Pero, \u00bfqu\u00e9 pasa si necesitas trabajar en equipo, en un proyecto de codificaci\u00f3n?&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Conoce GitHub.<\/span><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1600\" height=\"900\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/02_GitHub.jpg\" alt=\"Caracter\u00edsticas y funciones ofrecidas por GitHub\" class=\"wp-image-42019 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/02_GitHub.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/02_GitHub-300x169.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/02_GitHub-1024x576.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/02_GitHub-768x432.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/02_GitHub-1536x864.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/02_GitHub-600x338.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/02_GitHub-1200x675.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/02_GitHub-730x411.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/02_GitHub-1460x821.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/02_GitHub-784x441.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/02_GitHub-1568x882.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/02_GitHub-877x493.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/900;\" \/><\/figure><\/div>\n\n\n<p><a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">GitHub<\/span><\/a><span style=\"font-weight: 400;\"> es una plataforma de desarrollo para alojar repositorios de Git.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Es decir, es una forma de sacar tus repos de Git de tu m\u00e1quina local y llevarlos a Internet, generalmente para que otras personas te colaboren con ellos.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">GitHub se basa en la nube y tiene fines lucrativos, aunque sus elementos b\u00e1sicos pueden usarse gratis, una vez te registres.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">La funci\u00f3n principal de GitHub es permitir que los desarrolladores trabajen juntos en un solo proyecto en tiempo real, realizando revisiones remotas de c\u00f3digo, adem\u00e1s de monitorear el trabajo de los dem\u00e1s y actualizar el proyecto principal.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">GitHub mantiene la caracter\u00edstica principal de Git: evitar la sobreescritura y mantener todas las versiones guardadas de un proyecto. Tambi\u00e9n trae funciones y servicios adicionales, como m\u00e1s almacenamiento, r\u00e1pidos entornos de desarrollo, escritura de c\u00f3digo con inteligencia artificial, soporte para auditor\u00edas de c\u00f3digo y m\u00e1s. (M\u00e1s informaci\u00f3n, en su p\u00e1gina de <\/span><a href=\"https:\/\/github.com\/pricing\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">precios<\/span><\/a><span style=\"font-weight: 400;\">)&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Es importante mencionar que GitHub no es el \u00fanico servicio en este espacio. Hay alternativas como Bitbucket, GitLab, entre otras.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Sin embargo, Git y GitHub funcionan muy bien juntos. M\u00e1s adelante profundizaremos en ello.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Pero primero lo primero: hicimos una lista con muchos comandos de Git que todo desarrollador y equipo t\u00e9cnico deber\u00eda conocer, para tener \u00e9xito en este entorno de control de versiones.<\/span><span style=\"font-weight: 400;\"><br><\/span><span style=\"font-weight: 400;\"><br><\/span><span style=\"font-weight: 400;\">\n\n\n\n<div class=\"glossary-term\">\n\t<a\n\t\tclass=\"glossary-term__above-title\"\n\t\thref=\"\"\n\t\ttarget=\"_blank\"\n\t\trel=\"noopener noreferrer\"\n\t>\n\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 640 512\"><path d=\"M320 32c-8.1 0-16.1 1.4-23.7 4.1L15.8 137.4C6.3 140.9 0 149.9 0 160s6.3 19.1 15.8 22.6l57.9 20.9C57.3 229.3 48 259.8 48 291.9v28.1c0 28.4-10.8 57.7-22.3 80.8c-6.5 13-13.9 25.8-22.5 37.6C0 442.7-.9 448.3 .9 453.4s6 8.9 11.2 10.2l64 16c4.2 1.1 8.7 .3 12.4-2s6.3-6.1 7.1-10.4c8.6-42.8 4.3-81.2-2.1-108.7C90.3 344.3 86 329.8 80 316.5V291.9c0-30.2 10.2-58.7 27.9-81.5c12.9-15.5 29.6-28 49.2-35.7l157-61.7c8.2-3.2 17.5 .8 20.7 9s-.8 17.5-9 20.7l-157 61.7c-12.4 4.9-23.3 12.4-32.2 21.6l159.6 57.6c7.6 2.7 15.6 4.1 23.7 4.1s16.1-1.4 23.7-4.1L624.2 182.6c9.5-3.4 15.8-12.5 15.8-22.6s-6.3-19.1-15.8-22.6L343.7 36.1C336.1 33.4 328.1 32 320 32zM128 408c0 35.3 86 72 192 72s192-36.7 192-72L496.7 262.6 354.5 314c-11.1 4-22.8 6-34.5 6s-23.5-2-34.5-6L143.3 262.6 128 408z\"\/><\/svg>\n\t\t<span><\/span>\n\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 384 512\"><path d=\"M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"\/><\/svg>\n\t<\/a>\n    <h3>Github<\/h3>\n    <p>GitHub es un servicio basado en la nube que los desarrolladores utilizan para almacenar su c\u00f3digo, realizar seguimiento de los cambios en el c\u00f3digo y colaborar con otros desarrolladores. Es una plataforma popular para colaborar en tiempo real en proyectos de software.<\/p>\n    \n<\/div>\n\n<\/span><\/p>\n\n\n\n<h2 id=\"h-21-de-los-comandos-git-mas-usados-que-debes-conocer\" class=\"wp-block-heading\"><b>21 De Los Comandos Git M\u00e1s Usados Que Debes Conocer<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">\u00bfEst\u00e1s listo para conocer los mejores trucos Git que puedas imaginar?<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">En esta secci\u00f3n nos sumergiremos en comandos Git, instrucciones, y todo lo que necesitas para usar Git exitosamente. Es m\u00e1s, te daremos consejos para usar cada uno, en tus proyectos.<\/span><\/p>\n\n\n\n<p><b>Consejo profesional<\/b><span style=\"font-weight: 400;\"> para aprovechar este documento al m\u00e1ximo: Presiona \u2018command + F\u2019 en un Mac, o \u2018Ctrl + F\u2019 en Windows, para abrir una caja de b\u00fasqueda y encontrar un comando espec\u00edfico, en caso de que busques algo puntual.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-config\"><strong>git config<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">git config<\/span><span style=\"font-weight: 400;\"> es un comando muy \u00fatil para personalizar c\u00f3mo funciona Git en tres niveles: del sistema operativo (sistema); espec\u00edfico del usuario (global); y espec\u00edfico del repositorio (local).&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Prueba <\/span><span style=\"font-weight: 400;\">git config<\/span><span style=\"font-weight: 400;\"> con estos movimientos:&nbsp;&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git config --global user.email [tu direcci\u00f3n de correo]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Los desarrolladores lo ejecutan despu\u00e9s de descargar Git, para configurar su direcci\u00f3n de correo electr\u00f3nico.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git config --global user.name [tu nombre]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Con \u00e9l, configurar\u00e1s tu nombre de usuario.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git config --local<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Con \u00e9l, personalizar\u00e1s la configuraci\u00f3n espec\u00edfica de tu repositorio local. Esto anular\u00e1 las configuraciones predeterminadas de Git, en los niveles global y del sistema.&nbsp;<\/span><\/p>\n\n\n\n<div class=\"article-newsletter article-newsletter--gradient\">\n\n\n<h2>Get Content Delivered Straight to Your Inbox<\/h2><p>Subscribe now to receive all the latest updates, delivered directly to your inbox.<\/p><form class=\"nwsl-form\" id=\"newsletter_block_\" novalidate><div class=\"messages\"><\/div><div class=\"form-group\"><label for=\"input_newsletter_block_\"><input type=\"email\"name=\"email\"id=\"input_newsletter_block_\"placeholder=\"Enter your email address\"novalidatedisabled=\"disabled\"\/><\/label><button type=\"submit\"class=\"btn btn--brand\"disabled=\"disabled\"><span>Sign Me Up!<\/span><svg width=\"21\" height=\"14\" viewBox=\"0 0 21 14\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n<path d=\"M13.8523 0.42524L12.9323 1.34521C12.7095 1.56801 12.7132 1.9304 12.9404 2.14865L16.7241 5.7823H0.5625C0.251859 5.7823 0 6.03416 0 6.3448V7.6573C0 7.96794 0.251859 8.2198 0.5625 8.2198H16.7241L12.9405 11.8535C12.7132 12.0717 12.7095 12.4341 12.9323 12.6569L13.8523 13.5769C14.072 13.7965 14.4281 13.7965 14.6478 13.5769L20.8259 7.39879C21.0456 7.17913 21.0456 6.82298 20.8259 6.60327L14.6477 0.42524C14.4281 0.205584 14.0719 0.205584 13.8523 0.42524Z\" fill=\"white\"\/>\n<\/svg>\n<\/button><\/div><\/form><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-pull-nbsp\"><strong>git pull&nbsp;<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">git pull<\/span><span style=\"font-weight: 400;\"> es un comando para obtener c\u00f3digo de un repositorio remoto y descargarlo en tu repo local, el cual se actualizar\u00e1 luego, y coincidir\u00e1 con lo que acabas de obtener.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Este merge, es vital para usar Git. En realidad, abrevia otros dos comandos: <\/span><span style=\"font-weight: 400;\">git fetch<\/span><span style=\"font-weight: 400;\"> y luego <\/span><span style=\"font-weight: 400;\">git merge<\/span><span style=\"font-weight: 400;\">.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Estas son algunas maneras en las que este comando se usa, habitualmente:&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git pull [remote]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Obt\u00e9n un repositorio remoto espec\u00edfico y \u00fanelo con el repo local en que trabajas.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git pull --no-commit [remote]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Este comando obtiene el repo remoto, pero no lo fusiona autom\u00e1ticamente.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Como <\/span><i><span style=\"font-weight: 400;\">pull <\/span><\/i><span style=\"font-weight: 400;\">es un comando central de Git, hay muchas formas de utilizarlo. <\/span><a href=\"https:\/\/www.gitkraken.com\/learn\/git\/commands\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Git Branch Commands<\/span><\/a><span style=\"font-weight: 400;\"> ofrece a\u00fan m\u00e1s ejemplos y combinaciones nuevas para que pruebes.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-fetch-nbsp\"><strong>git fetch&nbsp;<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">git fetch<\/span><span style=\"font-weight: 400;\">, como comando independiente, descarga \u2018commits\u2019 de repositorios remotos en repos locales. Te brinda la opci\u00f3n de ver y cambiar el c\u00f3digo de otros desarrolladores. Prob\u00e9moslo:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git fetch origin<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Descarga una copia del repositorio remoto <\/span><i><span style=\"font-weight: 400;\">origin<\/span><\/i><span style=\"font-weight: 400;\"> y la guarda en tu disco local. Nada se cambia o fusiona por s\u00ed mismo, a diferencia de lo que pasa en <\/span><span style=\"font-weight: 400;\">git pull<\/span><span style=\"font-weight: 400;\"> de forma predeterminada.&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git fetch --all<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Obtiene datos de todos los repositorios remotos (incluyendo <\/span><i><span style=\"font-weight: 400;\">origin<\/span><\/i><span style=\"font-weight: 400;\">).<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git fetch --shallow-exclude=[revision]<\/span><span style=\"font-weight: 400;\">&nbsp;<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Excluye confirmaciones de ramas o etiquetas espec\u00edficas.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">\n\n\n\n<div class=\"glossary-term\">\n\t<a\n\t\tclass=\"glossary-term__above-title\"\n\t\thref=\"\"\n\t\ttarget=\"_blank\"\n\t\trel=\"noopener noreferrer\"\n\t>\n\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 640 512\"><path d=\"M320 32c-8.1 0-16.1 1.4-23.7 4.1L15.8 137.4C6.3 140.9 0 149.9 0 160s6.3 19.1 15.8 22.6l57.9 20.9C57.3 229.3 48 259.8 48 291.9v28.1c0 28.4-10.8 57.7-22.3 80.8c-6.5 13-13.9 25.8-22.5 37.6C0 442.7-.9 448.3 .9 453.4s6 8.9 11.2 10.2l64 16c4.2 1.1 8.7 .3 12.4-2s6.3-6.1 7.1-10.4c8.6-42.8 4.3-81.2-2.1-108.7C90.3 344.3 86 329.8 80 316.5V291.9c0-30.2 10.2-58.7 27.9-81.5c12.9-15.5 29.6-28 49.2-35.7l157-61.7c8.2-3.2 17.5 .8 20.7 9s-.8 17.5-9 20.7l-157 61.7c-12.4 4.9-23.3 12.4-32.2 21.6l159.6 57.6c7.6 2.7 15.6 4.1 23.7 4.1s16.1-1.4 23.7-4.1L624.2 182.6c9.5-3.4 15.8-12.5 15.8-22.6s-6.3-19.1-15.8-22.6L343.7 36.1C336.1 33.4 328.1 32 320 32zM128 408c0 35.3 86 72 192 72s192-36.7 192-72L496.7 262.6 354.5 314c-11.1 4-22.8 6-34.5 6s-23.5-2-34.5-6L143.3 262.6 128 408z\"\/><\/svg>\n\t\t<span><\/span>\n\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 384 512\"><path d=\"M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"\/><\/svg>\n\t<\/a>\n    <h3>Etiqueta<\/h3>\n    <p>Una etiqueta de WordPress es una taxonom\u00eda predeterminada que te permite categorizar tus publicaciones. Los lectores pueden hacer clic en la etiqueta de una publicaci\u00f3n para ver art\u00edculos similares con la misma etiqueta.<\/p>\n    \n<\/div>\n\n<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-merge-nbsp\"><strong>git merge<\/strong><span style=\"font-weight: 400;\">&nbsp;<\/span><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">El comando <\/span><span style=\"font-weight: 400;\">git merge<\/span><span style=\"font-weight: 400;\"> combina ramas (generalmente dos, aunque pueden ser m\u00e1s) para crear un historial \u00fanico. Git resaltar\u00e1 los conflictos que surjan en el merge, para que los resuelvas.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Las opciones para este comando incluyen:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git merge [branch name]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Con esto, fusiona los cambios de la rama nombrada, en la rama (branch) que est\u00e1s usando.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git merge --abort<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Detiene el merge y restaura el proyecto a su estado previo a ella. Este comando ilustra muy bien c\u00f3mo Git mantiene versiones anteriores del c\u00f3digo, para proteger el progreso del proyecto.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-add\"><strong>git add<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">git add<\/span><span style=\"font-weight: 400;\"> es el comando a usar cuando est\u00e1s listo para \u201cguardar\u201d una copia de tu trabajo. Suele usarse en conjunto con \u2014&nbsp;<\/span><span style=\"font-weight: 400;\">git commit<\/span><span style=\"font-weight: 400;\"> \u2014 pues agrega (o <\/span><i><span style=\"font-weight: 400;\">commit<\/span><\/i><span style=\"font-weight: 400;\">) lo ya guardado previamente en el historial en ejecuci\u00f3n del proyecto.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Estas son algunas formas para especificar qu\u00e9 guardar (o \u201cpreparar\u201d) con este comando:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git add [file]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Prepara todos los cambios hechos en un archivo puntual, para agregarlos al pr\u00f3ximo.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git add [directory]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">As\u00ed como el comando anterior, prepara cambios en un directorio espec\u00edfico, dej\u00e1ndolos listos para que los agregues cuando lo consideres.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-commit-nbsp\"><strong>git commit<\/strong><span style=\"font-weight: 400;\">&nbsp;<\/span><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">git commit<\/span><span style=\"font-weight: 400;\"> es el segundo comando base, de la trinidad de creaci\u00f3n y monitoreo de cambios Git.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">B\u00e1sicamente, este comando conlleva almacenar todo cambio hecho con el comando <\/span><span style=\"font-weight: 400;\">git add<\/span><span style=\"font-weight: 400;\">. No hace esos cambios en el c\u00f3digo principal, sino que solo los guarda de forma segura.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Algunas opciones para usar este comando, incluyen:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git commit --amend<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Modifica lel \u00faltimo <\/span><i><span style=\"font-weight: 400;\">commit<\/span><\/i><span style=\"font-weight: 400;\"> (lo \u00faltimo agregado), en lugar de crear uno nuevo por completo.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git commit -m [your message here]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Deja constancia de tu <\/span><i><span style=\"font-weight: 400;\">commit, <\/span><\/i><span style=\"font-weight: 400;\">con un mensaje que ir\u00e1 incluido dentro de los corchetes.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-push-nbsp\"><strong>git push<\/strong><span style=\"font-weight: 400;\">&nbsp;<\/span><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">git push<\/span><span style=\"font-weight: 400;\"> es el tercer elemento base, del ciclo colaborativo en Git. Env\u00eda todos tus cambios y <\/span><i><span style=\"font-weight: 400;\">commits <\/span><\/i><span style=\"font-weight: 400;\">en repositorios locales, a repos remotos. A partir de aqu\u00ed, otros desarrolladores del proyecto podr\u00e1n iniciar a trabajar sobre tus actualizaciones. Es lo contrario al comando <\/span><i><span style=\"font-weight: 400;\">fetch<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">As\u00ed es como se usa:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git push [remote] [branch]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Impulsa una rama espec\u00edfica, sus <\/span><i><span style=\"font-weight: 400;\">commits <\/span><\/i><span style=\"font-weight: 400;\">y objetos adjuntos. Adem\u00e1s, crea una nueva rama local en el repositorio remoto de destino.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git push [remote] --all<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Lleva todas las ramas locales a un repo remoto espec\u00edfico.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-branch-nbsp\"><strong>git branch&nbsp;<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Crea, edita, y remueve ramas en git, con el comando <\/span><span style=\"font-weight: 400;\">git branch<\/span><span style=\"font-weight: 400;\">. Usa el comando <\/span><i><span style=\"font-weight: 400;\">branch <\/span><\/i><span style=\"font-weight: 400;\">de estas maneras:&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git branch [branch]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Crea una nueva rama, la cual podr\u00e1s nombrar, reemplazando la palabra entre corchetes.&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git branch -c<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Este comando copia una <\/span><i><span style=\"font-weight: 400;\">Git branch<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git push [remote repo] --delete [ branch name]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Borra una <\/span><i><span style=\"font-weight: 400;\">Git branch<\/span><\/i><span style=\"font-weight: 400;\"> remota, nombrada en el \u00faltimo paquete o conjunto de corchetes.&nbsp;<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-checkout-nbsp\"><strong>git checkout&nbsp;<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Usa el comando <\/span><span style=\"font-weight: 400;\">git checkout<\/span><span style=\"font-weight: 400;\"> para navegar entre las ramas del repo en que est\u00e1s trabajando.&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git checkout [branch name]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Cambia a una <\/span><i><span style=\"font-weight: 400;\">Git branch<\/span><\/i><span style=\"font-weight: 400;\"> diferente, nombrada en los corchetes.&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git checkout -b [new-branch]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Simult\u00e1neamente, crea una nueva rama y ve a ella. Combinar\u00e1s <\/span><span style=\"font-weight: 400;\">git branch<\/span><span style=\"font-weight: 400;\"> y <\/span><span style=\"font-weight: 400;\">git checkout [new branch]<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-remote\"><strong>git remote<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Con el comando <\/span><span style=\"font-weight: 400;\">git remote<\/span><span style=\"font-weight: 400;\">, t\u00fa podr\u00e1s ver, crear, y borrar conexiones remotas, marcadores (por llamarlos de alguna manera), a otros repositorios. Esto te ayudar\u00e1 a referenciar repos en tu c\u00f3digo sin tener que buscarlos y usar sus nombres completos, lo que a veces es inc\u00f3modo.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Prueba estos comandos remotos:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git remote add [alias] [URL]&nbsp;<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">A\u00f1ade un repositorio remoto, especificando su enlace y d\u00e1ndole un alias, o sobrenombre.&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git remote -v<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Obt\u00e9n una lista de conexiones remotas, e incluye las URL de cada una.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-revert\"><strong>git revert<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">git revert<\/span><span style=\"font-weight: 400;\"> deshace cambios, creando un nuevo <\/span><i><span style=\"font-weight: 400;\">commit <\/span><\/i><span style=\"font-weight: 400;\">que los revierte, a tu gusto.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Una manera de usar (\u00a1cuidadosamente, por favor!) el comando <\/span><span style=\"font-weight: 400;\">git revert<\/span><span style=\"font-weight: 400;\">, es:&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git revert [commit ID]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Esto solo revertir\u00e1 cambios asociados con el <\/span><i><span style=\"font-weight: 400;\">commit <\/span><\/i><span style=\"font-weight: 400;\">espec\u00edfico ya identificado.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-reset-nbsp\"><strong>git reset&nbsp;<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">git reset<\/span><span style=\"font-weight: 400;\"> es un comando m\u00e1s riesgoso y potencialmente permanente para deshacer <\/span><i><span style=\"font-weight: 400;\">commits<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Este comando solo deber\u00eda usarse en repositorios locales o privados, para prevenir la eventual interrupci\u00f3n de la codificaci\u00f3n de alg\u00fan otro desarrollador, dentro de un repo p\u00fablico y remoto. Como puede \u201cdejar hu\u00e9rfanos\u201d a otros <\/span><i><span style=\"font-weight: 400;\">commits<\/span><\/i><span style=\"font-weight: 400;\">, los cuales podr\u00edan borrarse luego, durante la rutina de mantenimiento Git, este comando s\u00ed puede borrar el duro trabajo de alguien.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Este es un comando complejo que debe usarse con discreci\u00f3n. Por eso, antes de usarlo por primera vez, te recomendamos leer esta gu\u00eda sobre <\/span><a href=\"https:\/\/www.atlassian.com\/es\/git\/tutorials\/undoing-changes\/git-reset\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Git Reset<\/span><\/a><span style=\"font-weight: 400;\"> de Bitbucket.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-status-nbsp\"><strong>git status&nbsp;<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">git status<\/span><span style=\"font-weight: 400;\"> te brinda informaci\u00f3n sobre tu directorio de trabajo (es donde quedan las versiones almacenadas de tu historial) y el \u00e1rea de preparaci\u00f3n (es como un \u201c\u00e1rea en construcci\u00f3n\u201d entre el directorio y el repositorio). Con este comando, puedes ver en qu\u00e9 estado est\u00e1n tus archivos.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Hay una forma principal de utilizar este comando:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git status<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Mira una lista de archivos preparados, sin preparar y sin monitorear.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-clone-nbsp\"><strong>git clone<\/strong><span style=\"font-weight: 400;\">&nbsp;<\/span><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Usa <\/span><span style=\"font-weight: 400;\">git clone<\/span><span style=\"font-weight: 400;\"> para hacer una copia de un repositorio ya existente. As\u00ed, podr\u00e1s duplicar un repo para experimentar, sin da\u00f1ar nada disponible p\u00fablicamente. Aqu\u00ed tienes algunas opciones para usar este comando:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git clone [repository URL] --branch [branch name]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Clona el repositorio vinculado y dir\u00edgete justo a una <\/span><i><span style=\"font-weight: 400;\">Git branch<\/span><\/i><span style=\"font-weight: 400;\"> espec\u00edfica, en \u00e9l.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git clone [repo] [directory]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Clona un repo espec\u00edfico, en una carpeta de directorio particular en tu m\u00e1quina local.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-init\"><strong>git init<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Usa el comando <\/span><span style=\"font-weight: 400;\">git init<\/span><span style=\"font-weight: 400;\"> para crear un nuevo repositorio Git como un subdirectorio .git, en tu directorio actual de trabajo. Es diferente de <\/span><span style=\"font-weight: 400;\">git clone<\/span><span style=\"font-weight: 400;\">, pues te permitir\u00e1 crear un nuevo repo, en lugar de copiar tan solo, uno ya existente.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Las aplicaciones m\u00e1s comunes de este comando, incluyen:&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git init<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Aqu\u00ed comienza todo. Esto transforma tu directorio actual, en un repositorio Git.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git init [directory]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Con esto, podr\u00e1s convertir un directorio espec\u00edfico en un repo Git.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git init --bare<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Esto genera un nuevo repositorio <\/span><i><span style=\"font-weight: 400;\">bare<\/span><\/i><span style=\"font-weight: 400;\">, en el cual no se pueden hacer <\/span><i><span style=\"font-weight: 400;\">commits<\/span><\/i><span style=\"font-weight: 400;\">. Esto establece un territorio de <\/span><i><span style=\"font-weight: 400;\">staging<\/span><\/i><span style=\"font-weight: 400;\">, o de pruebas, realmente \u00fatil para generar un ambiente de colaboraci\u00f3n.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-rebase-nbsp\"><strong>git rebase&nbsp;<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">git rebase<\/span><span style=\"font-weight: 400;\"> puede reescribir la historia, para ayudarte a mantener limpios y precisos tus <\/span><i><span style=\"font-weight: 400;\">commits<\/span><\/i><span style=\"font-weight: 400;\">. Es una opci\u00f3n, si quieres hacer actualizaciones en la rama principal de tu proyecto, mediante un merge r\u00e1pido, para mostrar una historia m\u00e1s lineal.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git rebase [target branch name]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Elabora de nuevo tu rama actual, en una rama de destino espec\u00edfica.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git rebase [target branch name] -i<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Inicia una reelaboraci\u00f3n interactiva desde tu rama actual, hacia una rama de destino diferente.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Este es otro comando complejo que no debe usarse en repositorios p\u00fablicos, pues puede eliminar elementos importantes del historial de alg\u00fan proyecto. Para obtener informaci\u00f3n sobre c\u00f3mo funcionan sus versiones est\u00e1ndar e interactiva, te recomendamos de nuevo la gu\u00eda de <\/span><a href=\"https:\/\/www.atlassian.com\/es\/git\/tutorials\/rewriting-history\/git-rebase\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">git rebase<\/span><\/a><span style=\"font-weight: 400;\"> de Bitbucket.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-diff-nbsp\"><strong>git diff&nbsp;<\/strong><\/h3>\n\n\n\n<p><i><span style=\"font-weight: 400;\">Diffing<\/span><\/i><span style=\"font-weight: 400;\"> es la pr\u00e1ctica de mostrar las variaciones entre dos conjuntos de datos.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">El comando <\/span><span style=\"font-weight: 400;\">git diff<\/span><span style=\"font-weight: 400;\"> muestra las diferencias entre las fuentes de datos de Git, como los comentarios y los archivos, entre otros.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Las opciones para usar este comando incluyen:<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">git diff &#8211;staged<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Muestra la diferencia entre lo que est\u00e1 preparado y probado, pero a\u00fan no agregado.&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git diff [commit ID 1] [commit ID 2]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Este comando compara los cambios entre dos <\/span><i><span style=\"font-weight: 400;\">commits <\/span><\/i><span style=\"font-weight: 400;\">diferentes.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-tag-nbsp\"><span style=\"font-weight: 400;\"><strong>git tag<\/strong>&nbsp;<\/span><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">El comando <\/span><span style=\"font-weight: 400;\">git tag<\/span><span style=\"font-weight: 400;\"> apunta a un momento espec\u00edfico en el historial Git; usualmente, un lanzamiento de versi\u00f3n. Las etiquetas no cambian, como lo hacen las ramas.&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git tag [tag name]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Usa esto para nombrar una etiqueta y capturar el estado del repositorio en tiempo real.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git tag -d [tag name]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">\u00bfQuieres remover una etiqueta? Ejecuta este comando.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-rm-nbsp\"><strong>git rm&nbsp;<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">El comando <\/span><span style=\"font-weight: 400;\">git rm<\/span><span style=\"font-weight: 400;\"> borra archivos, del directorio de <\/span><i><span style=\"font-weight: 400;\">staging<\/span><\/i><span style=\"font-weight: 400;\"> y de aquel en que trabajas. Hay algunas maneras de probar <\/span><span style=\"font-weight: 400;\">git rm<\/span><span style=\"font-weight: 400;\">:&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git rm [file]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Este es el c\u00f3digo b\u00e1sico para preparar un archivo, que ser\u00e1 eliminado en el pr\u00f3ximo <\/span><i><span style=\"font-weight: 400;\">commit<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git rm --cached<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Esto remueve un archivo del \u00e1rea de <\/span><i><span style=\"font-weight: 400;\">staging<\/span><\/i><span style=\"font-weight: 400;\">, pero lo mantiene en el directorio en el cual est\u00e1s trabajando, para que tengas una copia local, en caso de que la necesites.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-log\"><strong>git log<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">git log<\/span><span style=\"font-weight: 400;\"> brinda un registro de todos los <\/span><i><span style=\"font-weight: 400;\">commits <\/span><\/i><span style=\"font-weight: 400;\">en la historia de un repositorio. \u00bfListo para probarlo? Aqu\u00ed vamos:&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git log [SHA]<\/span><span style=\"font-weight: 400;\">&nbsp;<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Un Algoritmo de Hash Seguro (SHA) es un identificador \u00fanico para cada <\/span><i><span style=\"font-weight: 400;\">commit<\/span><\/i><span style=\"font-weight: 400;\">. Usa este comando para mostrar un <\/span><i><span style=\"font-weight: 400;\">commit <\/span><\/i><span style=\"font-weight: 400;\">espec\u00edfico, as\u00ed como cada <\/span><i><span style=\"font-weight: 400;\">commit <\/span><\/i><span style=\"font-weight: 400;\">hecho previamente.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git log --stat<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">El comando muestra cu\u00e1les archivos se cambiaron en cada <\/span><i><span style=\"font-weight: 400;\">commit<\/span><\/i><span style=\"font-weight: 400;\">, cu\u00e1ntas l\u00edneas se a\u00f1adieron y\/o eliminaron, y cu\u00e1ntos archivos y l\u00edneas se editaron.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-git-show-nbsp\"><strong>git show&nbsp;<\/strong><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">El comando <\/span><span style=\"font-weight: 400;\">git show<\/span><span style=\"font-weight: 400;\"> da detalles sobre varios objetos Git, como \u00e1rboles, etiquetas y <\/span><i><span style=\"font-weight: 400;\">commits<\/span><\/i><span style=\"font-weight: 400;\">.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Aqu\u00ed hay algunas maneras de ejercitar este comando:&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git show [SHA]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Es el m\u00e1s sencillo de los comandos <\/span><span style=\"font-weight: 400;\">git show<\/span><span style=\"font-weight: 400;\">. Usa el SHA que aprendimos previamente, para mostrar los detalles de cualquier objeto.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git show [SHA]:path\/to\/file<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Esto mostrar\u00e1 una versi\u00f3n espec\u00edfica de un archivo que est\u00e1s buscando cuando incluyes su SHA.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">\u00bfTodav\u00eda est\u00e1s aprendiendo a usar Git, tienes preguntas sobre comandos mencionados, o solo est\u00e1s ansioso por explorar a\u00fan m\u00e1s variaciones, para manipular tu c\u00f3digo de mil maneras? Los <\/span><a href=\"https:\/\/www.atlassian.com\/es\/git\/tutorials\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">tutoriales Git<\/span><\/a><span style=\"font-weight: 400;\"> de Bitbucket son un gran recurso, profundo e interconectado, que te ayudar\u00e1 a llegar a donde quieras ir con Git.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Y deber\u00edas aprovechar todo esto a fondo. Despu\u00e9s de todo, el software de c\u00f3digo abierto, y la tecnolog\u00eda Git que lo impulsa, son el futuro de los negocios.<\/span><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1600\" height=\"950\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/03_GitHub_Stat.jpg\" alt=\"Estad\u00edsticas de uso de Github\" class=\"wp-image-42020 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/03_GitHub_Stat.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/03_GitHub_Stat-300x178.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/03_GitHub_Stat-1024x608.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/03_GitHub_Stat-768x456.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/03_GitHub_Stat-1536x912.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/03_GitHub_Stat-600x356.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/03_GitHub_Stat-1200x713.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/03_GitHub_Stat-730x433.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/03_GitHub_Stat-1460x867.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/03_GitHub_Stat-784x466.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/03_GitHub_Stat-1568x931.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/03_GitHub_Stat-877x521.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/950;\" \/><\/figure><\/div>\n\n\n<h2 id=\"h-comandos-en-la-vida-real-como-desarrollar-con-git-github-en-wordpress\" class=\"wp-block-heading\"><b>Comandos En La Vida Real: C\u00f3mo Desarrollar Con Git + GitHub En WordPress<\/b><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">Aqu\u00ed te presentamos muchos t\u00e9rminos y trucos que pueden ser nuevos para ti.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Si no est\u00e1s muy familiarizado con Git, entendemos que ser\u00e1 un poco dif\u00edcil ver c\u00f3mo todos estos t\u00e9rminos y trucos se unen, para funcionar en un escenario de la vida real.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">As\u00ed que no terminaremos este texto sin darte una gu\u00eda de apoyo, sobre c\u00f3mo utilizar Git y GitHub para prepararte a la hora de desarrollar, sobre un sitio web de WordPress.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-instala-wordpress-org\"><b>1. Instala WordPress.org<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Primero, la parte relacionada con WordPress.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Comenzar\u00e1s <\/span><a href=\"https:\/\/www.dreamhost.com\/blog\/es\/guia-instalacion-manual-wp\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">instalando una instancia de WordPress.org<\/span><\/a><span style=\"font-weight: 400;\"> (conoce aqu\u00ed la diferencia <\/span><a href=\"https:\/\/www.dreamhost.com\/blog\/es\/diferencias-wordpress-guia-principiantes\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">entre WordPress.com y WordPress.org<\/span><\/a><span style=\"font-weight: 400;\">) y crea un ambiente de pruebas local en tu computador.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Si a\u00fan no tienes establecido un buen proceso y herramientas ideales para esto, nos gusta <\/span><a href=\"https:\/\/localwp.com\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Local WP<\/span><\/a><span style=\"font-weight: 400;\">, una herramienta enfocada en desarrollo WordPress. \u00a1Te la recomendamos!<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-instala-git\"><b>2. Instala Git<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Luego, llega la hora de maniobrar con Git.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Instala Git si no lo has hecho a\u00fan. Encontrar\u00e1s su \u00faltima versi\u00f3n en el <\/span><a href=\"https:\/\/git-scm.com\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">sitio web de Git<\/span><\/a><span style=\"font-weight: 400;\">.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Muchas m\u00e1quinas con Mac y Linux, ya traen instalado Git. Verifica la tuya, abriendo tu interfaz de l\u00ednea de comandos (como Terminal en Mac o Git Bash en Windows), e ingresando el primer comando de este tutorial.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git --version<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Si Git est\u00e1 instalado, recibir\u00e1s un n\u00famero de versi\u00f3n de vuelta. Si no, esta <\/span><a href=\"https:\/\/github.com\/git-guides\/install-git\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">gu\u00eda de instalaci\u00f3n Git<\/span><\/a><span style=\"font-weight: 400;\"> te dar\u00e1 una mano al comenzar.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-crea-un-repo-local-con-git\"><b>3. Crea Un Repo Local Con Git<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Ahora, crearemos tu repositorio local de Git.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Accede a la carpeta de tu tema de WordPress (hicimos este ejemplo con Twenty Twenty-One), mediante este comando:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">cd\/Users\/[you]\/Documents\/Websites\/[website]\/wp-content\/themes\/twentytwentyone<\/span>\n<\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Reemplaza [you] y [website] con tus propios nombres de carpetas. Luego, inicia este directorio como repositorio, con este comando:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git init<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Para a\u00f1adir cada fila del directorio al \u00edndice, escribe:&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git add<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Confirma tus cambios con una nota que mantendr\u00e1 tu historial organizado, con este comando:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git commit -m \u201cfirst commit\"<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">\u00a1Tu repositorio local ha quedado configurado!<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-crea-un-repo-remoto-con-github-nbsp\"><b>4. Crea Un Repo Remoto Con GitHub&nbsp;<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">A estas alturas, deber\u00edas crear una cuenta en <\/span><a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">GitHub<\/span><\/a><span style=\"font-weight: 400;\">, si es que a\u00fan no tienes la tuya.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Una vez la crees y entres, podr\u00e1s crear un repositorio remoto, desde tu panel en GitHub.<\/span><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1600\" height=\"900\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/04_Create-A-Remote-Repo-With-GitHub.jpg\" alt=\"Creando un nuevo repo remoto en GitHub.\" class=\"wp-image-42021 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/04_Create-A-Remote-Repo-With-GitHub.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/04_Create-A-Remote-Repo-With-GitHub-300x169.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/04_Create-A-Remote-Repo-With-GitHub-1024x576.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/04_Create-A-Remote-Repo-With-GitHub-768x432.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/04_Create-A-Remote-Repo-With-GitHub-1536x864.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/04_Create-A-Remote-Repo-With-GitHub-600x338.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/04_Create-A-Remote-Repo-With-GitHub-1200x675.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/04_Create-A-Remote-Repo-With-GitHub-730x411.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/04_Create-A-Remote-Repo-With-GitHub-1460x821.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/04_Create-A-Remote-Repo-With-GitHub-784x441.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/04_Create-A-Remote-Repo-With-GitHub-1568x882.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/10\/04_Create-A-Remote-Repo-With-GitHub-877x493.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/900;\" \/><\/figure><\/div>\n\n\n<p><span style=\"font-weight: 400;\">Una vez termines de seguir los pasos, para configurar tu nuevo proyecto, llegar\u00e1 la hora de llevar tu tema de WordPress a tu nuevo repositorio remoto, ya en GitHub.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-5-anade-tu-proyecto-wordpress-a-github-aprendiendo-a-hacer-push\"><b>5. A\u00f1ade Tu Proyecto WordPress A GitHub (Aprendiendo A Hacer Push)<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Usa estos comandos en Git para llevar tu tema WordPress a GitHub:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git remote add origin [repo URL]<\/span><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git push -u origin master<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Reemplaza la URL entre corchetes, con un enlace al repo que configuraste en GitHub.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Despu\u00e9s, ingresa tu nombre de usuario y contrase\u00f1a de GitHub.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Una vez ingreses esos datos, los archivos confirmados en tu repositorio local, hasta este momento, se enviar\u00e1n a tu repo de GitHub.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-6-paso-opcional-obtener-pull-actualizaciones\"><b>6. Paso Opcional: Obtener (Pull) Actualizaciones<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Ahora que has trasladado los cambios de tu repositorio local, al repo remoto de GitHub, lo \u00faltimo que debes aprender, es c\u00f3mo obtener cambios para lograr lo contrario: a\u00f1adir actualizaciones, desde tu repositorio remoto, hacia el local.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Claro, si trabajas de manera independiente en tu proyecto de codificaci\u00f3n, no necesitar\u00e1s este paso. Pero conocerlo es \u00fatil, pues se vuelve necesario cuando colaboras con un equipo que hace y env\u00eda actualizaciones.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Entonces, obtengamos actualizaciones desde el repositorio local, con el comando <\/span><i><span style=\"font-weight: 400;\">fetch<\/span><\/i><span style=\"font-weight: 400;\">:&nbsp;<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">git fetch [URL]<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Recuerda reemplazar [URL] con el enlace del repo de origen de las actualizaciones.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">As\u00ed, los cambios se obtendr\u00e1n directamente desde GitHub y se copiar\u00e1n en tu repo local, para que ambos repositorios sean iguales. \u00a1Estar\u00e1s sincronizado y listo, para trabajar en la versi\u00f3n m\u00e1s reciente de tu proyecto!<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">\u00bfTodav\u00eda necesitas ayuda con Git?<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Para obtener una explicaci\u00f3n m\u00e1s detallada, consulta nuestra gu\u00eda <\/span><a href=\"https:\/\/www.dreamhost.com\/blog\/es\/como-usar-wordpress-con-github\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">C\u00f3mo Usar GitHub Para Desarrollo WordPress<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">O, mejor a\u00fan, <\/span><b>contacta a nuestros <\/b><a href=\"https:\/\/www.dreamhost.com\/es\/servicios-profesionales\/desarrollo\/\" target=\"_blank\" rel=\"noopener\"><b>expertos en desarrollo<\/b><\/a><b> de DreamHost<\/b><span style=\"font-weight: 400;\">.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Perm\u00edtenos encargarnos de los ajustes ocasionales en tu sitio web, o de la administraci\u00f3n completa del sitio, para que tu equipo pueda volver al trabajo de desarrollo y gesti\u00f3n que impulsar\u00e1 a tu negocio en adelante.<\/span><span style=\"font-weight: 400;\"><\/span><\/p>\n\n\n\n\n<div\n\tclass=\"article-cta-shared article-cta-small\"\n>\n    <div class=\"tr-img-wrap-outer jsLoading\"><img decoding=\"async\" class=\"js-img-lazy \" src=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/lazy-loading-transparent.webp\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/article-small-ad-cta-placeholder.webp 1x, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/article-small-ad-cta-placeholder-x2.webp 2x\"  alt=\"Ad background image\" \/><\/div>\n\n\n\n\n  <div class=\"content-btm\">\n    <h2\n      class=\"h2--md\"\n    >\n      T\u00fa Lo Sue\u00f1as, Nosotros Lo Codificamos\n    <\/h2>\n    <p\n      class=\"p--md\"\n    >\n      Aprovecha nuestros m\u00e1s de 20 a\u00f1os de experiencia en programaci\u00f3n, al elegir nuestro servicio de Desarrollo Web. Solo dinos qu\u00e9 deseas para tu sitio \u2014 y nosotros nos encargaremos.\n    <\/p>\n\n            <a\n            href=\"https:\/\/www.dreamhost.com\/es\/servicios-profesionales\/desarrollo\/\"\n                        class=\"btn btn--white-outline btn--sm btn--round\"\n                                    target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            >\n                            M\u00e1s Informaci\u00f3n                    <\/a>\n\n  <\/div>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Cualquiera que use o conozca Git, sabe que hay t\u00e9rminos y modificadores a seguir. Y debes mantenerte al tanto de todo, pues hoy en d\u00eda es un est\u00e1ndar en el control de versiones para productos tecnol\u00f3gicos. Pero en vez de retenerlo todo en tu memoria, creamos esta gu\u00eda completa de recursos con comandos cr\u00edticos. As\u00ed [&hellip;]<\/p>\n","protected":false},"author":1058,"featured_media":41958,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_yoast_wpseo_metadesc":"Conoce qu\u00e9 es Git, 21 comandos de Git que todo desarrollador deber\u00eda conocer y c\u00f3mo utilizarlos en un escenario de software de la vida real.","toc_headlines":"[[\"h-pequeno-resumen-entendiendo-git-github-y-el-sistema-de-control-de-versiones\",\"Peque\u00f1o Resumen: Entendiendo Git, GitHub, y el Sistema de Control de Versiones\"],[\"h-21-de-los-comandos-git-mas-usados-que-debes-conocer\",\"21 De Los Comandos Git M\u00e1s Usados Que Debes Conocer\"],[\"h-comandos-en-la-vida-real-como-desarrollar-con-git-github-en-wordpress\",\"Comandos En La Vida Real: C\u00f3mo Desarrollar Con Git + GitHub En WordPress\"]]","hide_toc":false,"footnotes":""},"categories":[11683],"tags":[],"class_list":["post-42016","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-es"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.3 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Lista Definitiva de Comandos de Git - DreamHost<\/title>\n<meta name=\"description\" content=\"Conoce qu\u00e9 es Git, 21 comandos de Git que todo desarrollador deber\u00eda conocer y c\u00f3mo utilizarlos en un escenario de software de la vida real.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"21 Comandos de GitHub Que Debes Conocer\" \/>\n<meta property=\"og:description\" content=\"Domina tus proyectos de GitHub con 21 comandos esenciales. Aprende a clonar, confirmar, fusionar y m\u00e1s para aprovechar al m\u00e1ximo tu experiencia con Git.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/\" \/>\n<meta property=\"og:site_name\" content=\"DreamHost Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DreamHost\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-03T14:00:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-16T22:39:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/1220-x-628-The-Ultimate-List-Of-Git-Commands-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ian Hernandez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"21 Comandos de GitHub Que Debes Conocer\" \/>\n<meta name=\"twitter:description\" content=\"Domina tus proyectos de GitHub con 21 comandos esenciales. Aprende a clonar, confirmar, fusionar y m\u00e1s para aprovechar al m\u00e1ximo tu experiencia con Git.\" \/>\n<meta name=\"twitter:creator\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:site\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ian Hernandez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Lista Definitiva de Comandos de Git - DreamHost","description":"Conoce qu\u00e9 es Git, 21 comandos de Git que todo desarrollador deber\u00eda conocer y c\u00f3mo utilizarlos en un escenario de software de la vida real.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/","og_locale":"en_US","og_type":"article","og_title":"21 Comandos de GitHub Que Debes Conocer","og_description":"Domina tus proyectos de GitHub con 21 comandos esenciales. Aprende a clonar, confirmar, fusionar y m\u00e1s para aprovechar al m\u00e1ximo tu experiencia con Git.","og_url":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/","og_site_name":"DreamHost Blog","article_publisher":"https:\/\/www.facebook.com\/DreamHost\/","article_published_time":"2023-10-03T14:00:50+00:00","article_modified_time":"2025-01-16T22:39:23+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/10\/1220-x-628-The-Ultimate-List-Of-Git-Commands-1.jpg","type":"image\/jpeg"}],"author":"Ian Hernandez","twitter_card":"summary_large_image","twitter_title":"21 Comandos de GitHub Que Debes Conocer","twitter_description":"Domina tus proyectos de GitHub con 21 comandos esenciales. Aprende a clonar, confirmar, fusionar y m\u00e1s para aprovechar al m\u00e1ximo tu experiencia con Git.","twitter_creator":"@dreamhost","twitter_site":"@dreamhost","twitter_misc":{"Written by":"Ian Hernandez","Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/#article","isPartOf":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/"},"author":{"name":"Ian Hernandez","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/person\/220faf2464d5ae08e41cf5f3b28fdc96"},"headline":"Comandos Git: 21 Opciones Que Debes Conocer","datePublished":"2023-10-03T14:00:50+00:00","dateModified":"2025-01-16T22:39:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/"},"wordCount":3419,"publisher":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/#primaryimage"},"thumbnailUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/09\/List-of-Git-Commands-HERO-Image.jpg","articleSection":["WordPress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/","url":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/","name":"Lista Definitiva de Comandos de Git - DreamHost","isPartOf":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/#primaryimage"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/#primaryimage"},"thumbnailUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/09\/List-of-Git-Commands-HERO-Image.jpg","datePublished":"2023-10-03T14:00:50+00:00","dateModified":"2025-01-16T22:39:23+00:00","description":"Conoce qu\u00e9 es Git, 21 comandos de Git que todo desarrollador deber\u00eda conocer y c\u00f3mo utilizarlos en un escenario de software de la vida real.","breadcrumb":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/#primaryimage","url":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/09\/List-of-Git-Commands-HERO-Image.jpg","contentUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/09\/List-of-Git-Commands-HERO-Image.jpg","width":1460,"height":1095,"caption":"List of Git Commands HERO Image"},{"@type":"BreadcrumbList","@id":"https:\/\/www-dev.dreamhost.com\/blog\/es\/comandos-git-ejemplos-aplicados\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dhblog.dream.press\/blog\/"},{"@type":"ListItem","position":2,"name":"Comandos Git: 21 Opciones Que Debes Conocer"}]},{"@type":"WebSite","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#website","url":"https:\/\/www-dev.dreamhost.com\/blog\/","name":"DreamHost Blog","description":"","publisher":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www-dev.dreamhost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization","name":"DreamHost","url":"https:\/\/www-dev.dreamhost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","contentUrl":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","width":1200,"height":168,"caption":"DreamHost"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DreamHost\/","https:\/\/x.com\/dreamhost","https:\/\/www.instagram.com\/dreamhost\/","https:\/\/www.linkedin.com\/company\/dreamhost\/","https:\/\/www.youtube.com\/user\/dreamhostusa"]},{"@type":"Person","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/person\/220faf2464d5ae08e41cf5f3b28fdc96","name":"Ian Hernandez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/04\/ian-hernandez-dreamhost-150x150.png","url":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/04\/ian-hernandez-dreamhost-150x150.png","contentUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/04\/ian-hernandez-dreamhost-150x150.png","caption":"Ian Hernandez"},"description":"Ian is a Product Designer based in Los Angeles, California. He is responsible for driving brand and product design at DreamHost, developing and maintaining our internal design system, and writing frontend code when he can. In his free time, he enjoys walking his dog, learning history, and discovering new music online and irl. Connect with him on LinkedIn: https:\/\/www.linkedin.com\/in\/ianhernandez23\/","url":"https:\/\/www-dev.dreamhost.com\/blog\/author\/ianh\/"}]}},"lang":"es","translations":{"es":42016,"en":41957,"pt":52959,"de":52962,"ru":54994,"uk":55059,"pl":55110,"it":67812,"fr":69210,"nl":69230},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/42016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/users\/1058"}],"replies":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/comments?post=42016"}],"version-history":[{"count":7,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/42016\/revisions"}],"predecessor-version":[{"id":63466,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/42016\/revisions\/63466"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/media\/41958"}],"wp:attachment":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/media?parent=42016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/categories?post=42016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/tags?post=42016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}