From ddbee914bee507d588874e48674bb7bb9457d579 Mon Sep 17 00:00:00 2001 From: vincent_b Date: Tue, 19 Nov 2024 20:33:22 +0100 Subject: [PATCH] GIT Commandes --- README.md | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a784e81..2fafa49 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,21 @@ Git commit /OU/ directement depuis la commmande > git commit -m 'initial commit of my project' +Visualiser les modifications : +> git log -p -2 +> git log --pretty=oneline + + +voir l'historique +> git log --pretty=format:"%h %s" --graph + +annuler un ajout sur un fichier +> git checkout -- CONTRIBUTING.md +restaure +> git restore --staged CONTRIBUTING.md + + + BRANCHES TUTO : https://git-scm.com/book/fr/v2/Les-branches-avec-Git-Les-branches-en-bref @@ -191,14 +206,20 @@ revenir/changer à la branche d'origine "main" (ou "forkit") > git checkout main > git checkout forkit -merge -> git merge forkit - envoyer les modifications à une branche spécifique > git push --set-upstream origin main -voir l'historique -> git log --pretty=format:"%h %s" --graph +merge +> git merge forkit + +gestion de conflit de versions +TUTO : +- https://git-scm.com/book/fr/v2/Les-branches-avec-Git-Branches-et-fusions%C2%A0:-les-bases#s_basic_merging +> git status +> git mergetool + + +