Logo hdtoledo
hdtoledo.dev
Módulos_del_Sistema
EJERCICIO_PRÁCTICO

Ninja Tools: Stash, Rebase and Cherry-Pick

Advanced Tools

1. Git Stash

You are working on a feature, have uncommitted code, but need to switch branches urgently for a bug fix.

bash
# Save to "pocket" git stash # Switch back later and retrieve git stash pop

2. Git Cherry-Pick

Copy a specific commit from anywhere to your current branch.

bash
git cherry-pick a1b2c3d

3. Git Rebase

An alternative to merge. It rewrites history to create a clean, linear project history.

bash
git switch feature git rebase main

(Warning: Never rebase a public branch that others are using).