Upload
spamaert
View
421
Download
1
Embed Size (px)
DESCRIPTION
Introduction à Git et GitHub
Citation preview
Introduction
Atelier GIT + GitHub
Git sans GitHubInstallationVersionning d’un répertoire localCommandes essentielles
Travail collaboratif avec GitHubConfigurationSynchronisation du répertoire localAuthentification sans mots de passeContribuer à un projet
Sommaire
Gestion des branchesConflits lors d’un mergeCommandes avancées rarement utilisées
Non Traités
Installation :apt-get install git
Configuration :Globale : ~/.gitconfigProjet : [DOSSIER_PROJET]/.git/config
Git - Installation
[user]name = aertemail = [email protected]
[color] status = auto ui = auto interactive = auto
[push]default = simple
[alias] lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
co = commit -a di = diff --color-words pe = diff --stat st = status
Git - Installation
mkdir atelier-gitcd atelier-gittouch MonNouveauFichier.txt git init .
Git – Versionning local
Versionning Local :git statusgit add [FICHIERS | DOSSIERS]git commit –m ‘MESSAGE’git checkout –- [FICHIERS]git reset –-hard HEADgit rebase –i
Versionning Distant :git clone [URL] [DOSSIER-LOCAL]git pullgit pushgit fetchgit merge
Git – Commandes Essentielles
Création du compteConfiguration du poste de travail
GitHub - Configuration
Créer le nouveau projet GitHub : atelier-gitLier le projet au répertoire local :
Suivre les consignes GitHub !Synchroniser :
Envoi : git pushRéception : git pull = git fetch && git merge
GitHub - Synchronisation
Suivre la procédure officielle :https://
help.github.com/articles/generating-ssh-keysChanger l’URL, protocole GIT:// et non HTTPS://
GitHub – Authentification par Clefs
Bouton ForkFaire les modifications dans le repository
personnelhttps://help.github.com/articles/syncing-a-fork
Créer les PULL Requests
GitHub - Contribuer