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:gitcommands [2020/04/30 07:27] alfred [Several remotes] |
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]'' | ||