Herramientas de usuario

Herramientas del sitio


wiki2:gitcommands

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:gitcommands [2020/03/18 09:53]
alfred
wiki2:gitcommands [2020/06/16 12:26] (actual)
Línea 92: Línea 92:
 </​code>​ </​code>​
  
 +===== Reset =====
 +==== Reset a full repo ====
 +<​code>​
 +git reset --hard HEAD
 +git clean -f -d
 +</​code>​
 +
 +==== Reset a single file ====
 +<​code>​
 +git checkout filename
 +</​code>​
 +
 +==== Reset a file with the same name as a branch ====
 +
 +<​code>​
 +git checkout -- filename
 +</​code>​
 +
 +==== Remove not tracket files ====
 +<​code>​
 +git clean -f -d 
 +</​code>​
 ===== Branches ===== ===== Branches =====
   * Create new branch: ''​git checkout -b [name_of_your_new_branch]''​   * Create new branch: ''​git checkout -b [name_of_your_new_branch]''​
Línea 236: Línea 258:
 </​code>​ </​code>​
  
 +Other easier:
 +<​code>​
 +git remote add gitea https://​git.alfredgg.dev/​gtd/​docker-without-pants.git
 +git push gitea
 +</​code>​
 ==== Use git from another folder ==== ==== Use git from another folder ====
 <​code>​ <​code>​
wiki2/gitcommands.1584525225.txt.gz · Última modificación: 2020/05/09 09:24 (editor externo)