Comandos GIT Flashcards

1
Q

Creación de un repositorio

A

git init

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Clonación de un repositorio

A

git clone uri

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Configuración básica

A

git config

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Estado del repositorio

A

git status

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Listar diferencias (ej:entre commits)

A

git diff

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Información en detalle sobre los cambios en ficheros (autor, etc…)

A

git blame

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Fusionar ramas

A

git merge

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Creación de etiquetas

A

git tag

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Subir commit a Github (de local repo a remote repo)

A

git push

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Bajar commits de otros devs pero no actualiza el Working Directory (de remote repo a local repo)

A

git fetch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Bajar commits de otros devs que hayan subido a Github (de remote repo a local repo)

A

git pull

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Para no generar commits que no aportan

A

git commit -amend

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Para movernos de rama o recuperar/deshacer cambios en un fichero

A

git checkout y git switch para moverte de rama
git checkout para deshacer un cambio

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Para descartar todos los cambios incluso deshacer/volver commits (se pierden)

A

git reset
–hard: ellimina el commit de la historia
–soft: elimina el commit de la historia pero los cambios se llevan a Stagin Area
–mixed: elimina el commit de la historia pero los cambios se llevan a Working Area

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Reescribiendo la historia (lineal)

A

git checkout feature / git rebase master

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Subir a distintos repositorios remotos

A

git remote -v

17
Q

Crear o listar una rama

A

git branch