100 Días de DevOps: Día 31

Guía paso a paso para restaurar un stash en Git, confirmar cambios y empujarlos al remoto, con prácticas DevOps y automatización en la nube.

4 sept 2025 • 2 min read • Q2BSTUDIO Team

Inteligencia-Artificial-

Restaurar cambios guardados con git stash es una práctica común en equipos DevOps para resguardar trabajo en curso sin comprometerlo. A continuación encontrarás una guía clara para aplicar un stash específico stash@{1}, confirmar los cambios y enviarlos al remoto de forma segura.

Paso 1. Ve al repositorio del proyecto

cd /usr/src/kodekloudrepos/news

Paso 2. Revisa los stashes disponibles

git stash list

Ejemplo de salida

stash@{0}: WIP en main: Diseño inicial añadido

stash@{1}: WIP en main: Estilos de la página principal actualizados

stash@{2}: WIP en feature-branch: Llamadas a API refactorizadas

Cada guarda tiene un identificador tipo stash@{n} que te permite referenciarlo con precisión.

Paso 3. Restaura el stash específico

git stash apply stash@{1}

apply recupera los cambios pero mantiene el stash en la lista. Si prefieres aplicarlo y eliminarlo de una vez, usa

git stash pop stash@{1}

Paso 4. Verifica los cambios restaurados

git status

git diff

Así confirmas que los cambios regresaron a tu directorio de trabajo.

Paso 5. Prepara y confirma los cambios

git add nombre_de_archivo

git commit -m feat restaura cambios de stash@{1}

Usa un mensaje descriptivo que explique claramente el contexto de la restauración.

Paso 6. Envía los cambios al repositorio remoto

git push origin main

Si tu rama no es main, sustitúyela por la correcta como master o develop. Para comprobar la rama actual

git branch --show-current

Ideas clave. git stash es como una estantería temporal para trabajo en progreso. Lista los stashes con git stash list. Usa git stash apply stash@{n} para restaurar sin borrar y git stash pop stash@{n} para restaurar y quitar. Tras restaurar, confirma y empuja al remoto para preservar el historial del proyecto.

En Q2BSTUDIO acompañamos a equipos DevOps y de desarrollo con prácticas sólidas de control de versiones, integración continua y entrega continua, alineadas con proyectos de software a medida y aplicaciones a medida. Impulsamos flujos de trabajo eficientes, automatización robusta y despliegues confiables en servicios cloud aws y azure, diseñando pipelines que escalan con tu negocio.

Nuestro equipo es especialista en inteligencia artificial, ciberseguridad, servicios inteligencia de negocio y power bi, además de ia para empresas y agentes IA que aceleran decisiones y eliminan tareas repetitivas. Si tu estrategia DevOps opera en la nube, conoce nuestros servicios cloud en AWS y Azure para optimizar costes, seguridad y rendimiento. Y si buscas reducir tiempos de entrega y disminuir errores humanos, explorá nuestra automatización de procesos para integrar pruebas, despliegues y observabilidad desde el primer día.

Con Q2BSTUDIO obtienes una hoja de ruta integral que une desarrollo, operaciones y negocio. Desde software a medida y ciberseguridad avanzada hasta inteligencia artificial aplicada y cuadros de mando con power bi, llevamos tus repositorios y pipelines a un nivel superior con prácticas DevOps reales, medibles y sostenibles.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Artificial intelligence

AI agents, chatbots, and intelligent assistants that automate tasks and serve your customers 24/7 to improve the efficiency of your business.

More info

Software Development

Web, mobile, and desktop applications, intranets, e-commerce, SaaS, and management platforms designed for your company's specific needs.

More info

Cloud services

Migration, infrastructure, managed hosting, high availability, and security on Microsoft Azure and Amazon Web Services to help your business scale without limits.

More info

Cybersecurity and pentesting

Security audits, penetration testing and protection of applications, data and infrastructure on-premise and cloud, with ethical hacking and regulatory compliance.

More info

Business Intelligence

Dashboards and data analysis with Power BI: we integrate your sources, design dashboards and KPIs and turn your data into decisions.

More info

Process automation

We automate repetitive tasks and connect your applications with n8n, Power Automate, Make, and RPA, eliminating manual work and increasing productivity.

More info

Training for Companies

We train your teams in technology with criteria: web development, databases, Git, best practices and security, automation with n8n, artificial intelligence for companies and creation of AI solutions with Azure AI Foundry.

More info

Code Auditing

We audit the code that you, your team or an AI create: we tell you what is good and what to improve, we secure it and make it ready for production, web or app.

More info

AI Image Generation

We create for you the images that your business needs with artificial intelligence: product, networks, advertising, illustration and avatars. You tell us what you want and we deliver it ready to use.

More info

AI Video Generation

We create videos with artificial intelligence for you: promotional, networking, virtual presenters, dubbing and animations. You tell us the idea and we will deliver it assembled and ready to publish.

More info

AI Conversational Avatars

We create conversational avatars with AI – digital humans with a face and voice – that serve your customers and teams with the knowledge of your company, on your website, interactive monitors, WhatsApp or Teams.

More info

Online Marketing and AI

Google Ads, Meta Ads, LinkedIn Ads and AI Engine Positioning (GEO/AEO): we attract customers and make your brand appear where they search for you, also on ChatGPT, Gemini and Perplexity.

More info

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.

Live Chat