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/06 16:25]
root [Eliminar branch local]
wiki2:gitcommands [2020/06/16 12:26] (actual)
Línea 85: Línea 85:
 <​code>​ <​code>​
  git reset HEAD~   git reset HEAD~ 
 +</​code>​
 +
 +==== Unstage changes ====
 +<​code>​
 +git rm --cached -r -- .
 +</​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>​ </​code>​
 ===== Branches ===== ===== Branches =====
Línea 138: Línea 166:
  
 Upload tags to the remote: ''​git push origin --tags ''​ Upload tags to the remote: ''​git push origin --tags ''​
 +
 +Remove a tag:
 +<​code>​
 +git push --delete origin <​tagname>​
 +</​code>​
 ===== Push over a non-bare repo ===== ===== Push over a non-bare repo =====
 You need to set denyCurrentBranch You need to set denyCurrentBranch
Línea 225: 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.1583511904.txt.gz · Última modificación: 2020/05/09 09:24 (editor externo)