Git commands Flashcards

1
Q

git init

A

creer un nv depot vide .git.

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

git status

A

affiche l’etat actuel du depot, la diff entre le repertoire , l’index et le Head.

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

git add

A

ajouter un fichier depuis le repertoire vers l’index.

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

git commit

A

valide les modifications et ajouter le fichier depuis l’index vers le head.g

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

git log

A

affiche l’historique des commits.

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

git clone

A

clone un depot existant local ou distant

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

git pull

A

recupere les modifications depuis un depot distant vers HEAD

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

git push

A

publie les modifications depuis Head vers le depot distant.

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

git diff <source-branche><target-branche></target-branche></source-branche>

A

affiche la difference entre les fichiers modifiée et les anciens versions.

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

git rm –cached

A

supprimer sur l’index intermediaire seulement.

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

git rm -f

A

supprimer du repertoire de travail et de l’index.

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

git branch NomB

A

créer une nouvelle branche.

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

git checkout NomB

A

créer et basculer vers la nouvelle Branche.

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

git switch NomB

A

Basculer vers la Branche NomB

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

git merge Nom

A

fusionner 2 ou plusieurs Branche.

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

git branch -d NomB

A

supprimer une branche

17
Q

git merge -abort

A

annule la fusion mais qu’aprés que la fusion ait entrainé

18
Q

git reset

A

annule un commit

19
Q

git restore –staged fileName

A

restore le contenu de l’index