Muestra las diferencias entre dos versiones de la página.
| Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa | ||
|
wiki2:git_pipelines [2021/04/23 18:27] alfred [GIT Pipelines] |
wiki2:git_pipelines [2022/03/13 11:35] (actual) |
||
|---|---|---|---|
| Línea 10: | Línea 10: | ||
| git branch -d feature-branch | git branch -d feature-branch | ||
| git push origin --delete feature-branch | git push origin --delete feature-branch | ||
| + | </code> | ||
| + | |||
| + | ===== How to... ===== | ||
| + | |||
| + | |||
| + | ==== Configure an ssh key ==== | ||
| + | |||
| + | Generate an ssh key without passphrase or it will keep asking you for for it. You need to upload the public key to the server. Then, configure the host in your ssh config: | ||
| + | |||
| + | <code> | ||
| + | Host bitbucket.org | ||
| + | IdentityFile ~/.ssh/keys/gitkey | ||
| + | </code> | ||
| + | |||
| + | This will allow you to do: | ||
| + | <code> | ||
| + | git clone git@bitbucket.org:gfms/shopifyapp.git | ||
| + | </code> | ||
| + | |||
| + | ℹ️ If you want to debug, you can do: | ||
| + | <code> | ||
| + | ssh -vvv git@git.alfredgg.dev | ||
| + | </code> | ||
| + | ==== This could be a good config ==== | ||
| + | <code> | ||
| + | Host git.alfredgg.dev | ||
| + | Port 222 | ||
| + | IdentityFile ~/.ssh/keys/gitkey | ||
| + | User git | ||
| + | </code> | ||
| + | |||
| + | ==== Commits ==== | ||
| + | |||
| + | ==== ... get a commit from another branch? ==== | ||
| + | <code> | ||
| + | git cherry-pick <commit> | ||
| + | </code> | ||
| + | |||
| + | |||
| + | ==== Merges ==== | ||
| + | === ... abort a merge? === | ||
| + | <code> | ||
| + | git merge --abort | ||
| + | </code> | ||
| + | |||
| + | ==== Reset ==== | ||
| + | |||
| + | === ... make a big reset? === | ||
| + | Also cleaning new files | ||
| + | <code> | ||
| + | git clean -f -d | ||
| + | git reset --hard | ||
| </code> | </code> | ||