Skip to content

Instantly share code, notes, and snippets.

View juankiz123's full-sized avatar

J. C. Rios Varas juankiz123

View GitHub Profile
//Get the project
git clone git@github.com:username/repositoryname.git
//Make changes to the project
//Problem! You made changes to the project beeing on master branch, how do you save those changes to a new branch?
//Save a stack
git stash
//Check actual file mode
@czegarram
czegarram / commands.md
Last active August 29, 2015 13:56
Comandos Útiles Git
  • Clonar un branch: git checkout -b <new_local_branch>
  • Push a un nuevo branch: git push -u origin <new_branch_to_push_central>
  • Clonar un branch externo en local: git branch --track <branch-name> <origin/branch-name>
  • Log de Git: git log
  • Regresar a un commit anterior: git branch branchname <sha1-of-commit>
  • Crear un branch a partir de un commit anterior: git branch branchname HEAD~3 (Numero que especifica cuantos commits for debajo del ultimo commit)
  • Merge Tool: git config --global merge.tool kdiff3 (Recomiendo este merge tool, primero se tiene que instalar)