re-structure notes
Affected files: README.md config.ts notes/Crear una nueva funcionalidad.md notes/Cypress.md notes/Depression.md notes/Design.md notes/Dev Tools.md notes/Email.md notes/Git.md notes/Good Enough.md notes/How to build systems.md notes/Meditation.md notes/Misc.md notes/Neovim.md notes/React.md notes/Self Steam.md notes/The cult of done.md notes/Tiding up the todos list.md notes/Work.md notes/conventional_commits.md notes/daily/2023-08-11.md notes/daily/2023-10-26.md notes/daily/2023-10-27.md notes/free time.md notes/fuuka-juno.md notes/index.md notes/ulysses pact.md
This commit is contained in:
parent
e8f35d383a
commit
3b9bdd9d44
27 changed files with 0 additions and 83 deletions
25
notes/Git.md
Normal file
25
notes/Git.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
## Merge strategies
|
||||
|
||||

|
||||
|
||||
## Buscar cuando un bug se introdujo
|
||||
|
||||
Utilizar `git bisect`
|
||||
|
||||
## Fix messy commits
|
||||
|
||||
Ya que estas opciones sobre escriben el historial de git, solo deben aplicarse en local y no commits publicados a un remote.
|
||||
|
||||
### Last commit
|
||||
|
||||
Si solo necesitamos agregar un cambio pequeño al ultimo commit (typo o correr el formatter), podemos aplicarlo con `git commit --ammend`, se puede sobre escribir el mensaje con `-m`.
|
||||
|
||||
### Mutiple commits
|
||||
|
||||
Se pueden arreglar el historial de commits con un `git rebase -i [since commit or branch]` y utilizar las estratégias de pick, squash, reword y drop.
|
||||
|
||||
En caso de que sepamos que haremos un commit que luego no necesitaremos, podemos hacer:
|
||||
- `git commit --fixup [commit hash]` -> descarta el commit message de este commit y mantiene el del commit de referencia
|
||||
- `git commit --squash [commit hash]` -> git juntará los mensajes de todos los commits a hacer squash y el commit de referencia.
|
||||
|
||||
Finalmente podemos hacer `git rebase -i --autosquash` y git eligirá las opciones necesarias a tomar en vez de tener que hacerlo de manera manual.
|
||||
Loading…
Add table
Add a link
Reference in a new issue