Herramientas de usuario

Herramientas del sitio


wiki2:git_pipelines

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anterior Revisión previa
Próxima revisión
Revisión previa
wiki2:git_pipelines [2020/05/09 08:25]
127.0.0.1 editor externo
wiki2:git_pipelines [2022/03/13 11:35] (actual)
Línea 1: Línea 1:
-====== GIT Pipelines ======+====== GIT Pipelines ​and How To'​s ​======
 ===== Merge a feature branch ===== ===== Merge a feature branch =====
 <​code>​ <​code>​
 +git checkout master
 # Merge with squash so it's clean # Merge with squash so it's clean
-merge feature-branch master --squash+git merge feature-branch master --squash
 git checkout master git checkout master
 git commit -a git commit -a
Línea 9: 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>​
wiki2/git_pipelines.1589012710.txt.gz · Última modificación: 2020/05/09 09:25 (editor externo)