GIT Commandes
This commit is contained in:
31
README.md
31
README.md
@@ -177,6 +177,21 @@ Git commit
|
|||||||
/OU/ directement depuis la commmande
|
/OU/ directement depuis la commmande
|
||||||
> git commit -m 'initial commit of my project'
|
> 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
|
BRANCHES
|
||||||
TUTO : https://git-scm.com/book/fr/v2/Les-branches-avec-Git-Les-branches-en-bref
|
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 main
|
||||||
> git checkout forkit
|
> git checkout forkit
|
||||||
|
|
||||||
merge
|
|
||||||
> git merge forkit
|
|
||||||
|
|
||||||
envoyer les modifications à une branche spécifique
|
envoyer les modifications à une branche spécifique
|
||||||
> git push --set-upstream origin main
|
> git push --set-upstream origin main
|
||||||
|
|
||||||
voir l'historique
|
merge
|
||||||
> git log --pretty=format:"%h %s" --graph
|
> 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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user