DevTools

Cheatsheet SourceTree

Cliente Git gráfico gratuito para Windows e Mac

Volver a los lenguajes
SourceTree
20 tarjetas encontradas
Categorías:
Versiones:

Ficheiro e Repo


3 cards
Abrir / Clonar
Ctrl + O      (abrir repo)
Ctrl + Shift + O (clonar)
File → New → Clone from URL
File → New → Create Local

Abrir repositorios.

Vistas
File Status   # archivos modificados
History      # log de commits
Branches    # lista de ramas
Remotes     # repositorios remotos
Stashes     # cambios guardados

Paneles principales.

Configuración
Tools → Options → Git
Configurar nombre y email
Elegir versión de Git
SSH keys: Tools → Create SSH Key

Configurar SourceTree.

Commits


4 cards
Hacer commit
Ctrl + Enter   (commit)
File Status → seleccionar archivos
Escribir mensaje
Commit / Commit & Push

Crear commit.

Stage / Unstage
Stage Selected → mover a staged
Unstage Selected → volver a unstaged
Stage All / Unstage All
Discard → revertir cambios

Gestionar el staging area.

Amend e historial
Clic derecho en el último commit
→ Amend Last Commit
→ Reset current branch to this commit
History → ver diff de cada commit

Modificar commits.

Diff y blame
Clic en el archivo → ver diff
Clic derecho → Annotate (blame)
Clic en una línea → ver commit
Diff contra branch: clic derecho → Diff

Comparar cambios.

Branches


3 cards
Crear branch
Ctrl + B        (nuevo branch)
Branch → New Branch
Nombre: feature/new-feature
Checkout New Branch (cambiar ya)

Crear nueva rama.

Gestionar branches
Clic derecho en el branch:
→ Checkout
→ Delete
→ Rename
→ Push to origin
→ Track remote branch

Operaciones en ramas.

Comparar branches
Seleccionar 2 branches
→ Diff Against Current
Ver commits adelante/atrás
Log filtrado por branch

Comparar ramas.

Remoto


3 cards
Push
Ctrl + Shift + P (push)
Push → seleccionar branch
Push tags: incluir checkbox
Force push: Options → Force

Enviar al remoto.

Pull y Fetch
Ctrl + T        (pull)
Ctrl + Shift + T (fetch)
Pull → Rebase instead of merge
Prune: eliminar refs obsoletas

Obtener cambios remotos.

Remotos
Repository → Repository Settings
→ Remotes tab
Add / Edit / Remove remote
URL: https o SSH

Gestionar remotos.

Merge e Rebase


3 cards
Merge
Checkout del target branch
Clic derecho en el source branch
→ Merge
→ Squash commits (opcional)
Resolver conflictos en el editor

Integrar branches.

Rebase
Clic derecho en el branch base
→ Rebase current branch onto
Interactivo: resolver paso a paso
Abort: Actions → Resolve Conflicts → Abort

Rebase de branch.

Resolver conflictos
Archivos en conflicto → destacados
Clic → Resolve Conflicts
→ Open in Merge Tool
Aceptar: Use Mine / Use Theirs
Mark Resolved → Commit

Resolver conflictos de merge.

Avançado


4 cards
Stash
Ctrl + Shift + S (stash)
Repository → Stash
Apply Stash / Pop Stash
Drop Stash (borrar)

Guardar cambios temporales.

Cherry-pick
History → seleccionar commit
Clic derecho → Cherry Pick
Aplica solo ese commit
Útil para backports

Aplicar commit específico.

Tags
Repository → Create Tag
Nombre: v1.0.0
Anotada: con mensaje
Push tag: Push → incluir tags

Crear y gestionar tags.

Reset y revert
Clic derecho en el commit:
→ Reset to this commit
  Soft / Mixed / Hard
→ Revert commit
  (crea commit inverso)

Deshacer cambios.