outils:recherche:gitlab:faq

FAQ

git diff <commit> <fichier>

Exemple :

git diff 039466295 Readme.txt
 git checkout <commit> <fichiers>

Exemple :

git checkout 039466295 Readme.txt
git checkout <fichiers>

(donc présent dans l'index)

git reset HEAD
git reset hard HEAD
git reset hard <commit> 

(non publiés sur le dépôt distant)

git reset hard origin/master
 git checkout -b [branche] [nomdistant]/[branche]

Exemple :

git checkout -b correctionbug origin/correctionBug 
 git checkout -b [branche] [tag]

Exemple :

git checkout -b version3 v3.0.0 
git commit --amend

Cette commande affiche et permet de modifier le dernier commentaire ajouté.

Attention, si le commit a été poussé sur un repository distant, ne modifiez pas les commit.

git commit -m "Voici un commit"
git add fichier_ajouter.txt
git commit --amend 

La commande –amend ajoutera le fichier au dernier commit sans en modifier le commentaire.

  • outils/recherche/gitlab/faq.txt
  • Dernière modification : 2023/02/02 12:24
  • de 127.0.0.1