Commandes pour Git et GitHub
sudo apt-get install gitssh-keygen -t rsa -C "mail@domain.com"pbcopy <~/.ssh/id_rsa.pubssh -T git@Github.comgit clone git@Github.com pseudo/ HYPERLINK <repository_link>git config --global user.name "Prenom Nom"git config --global user.email "mail@monsite.fr"git init
git init |
Initialisation d'un répertoire
|
git status |
Affiche le statut
|
git add <file> |
Ajoute un fichier
|
git add * |
Ajoute les nouveaux fichiers
|
git delete <file> |
Supprime un fichier
|
git commit -m "the message" |
Créer un commit avec un message
|
git log |
Affiche les commits antérieurs à l'actif
|
git show <commit_hash> |
Affiche les infos d'un commit
|
git branch <branch> |
Crée une branche
|
git branch -v |
Affiche les branches courantes
|
git checkout <parameters> |
Switch sur une branche ou un commit
|
git checkout -b <branch_name> |
Créer une nouvelle branche et switch dessus
|
git merge <branch> |
Fusionne la branche citée et le branche active
|
git remote add <remote_name> <repository_link> |
|
git push -u <remote_name> <branch_name> |
|
git pull <remote_name> <branch_name> |
|
git clone <repository_link> |
Clone un projet sur sa machine
|
git help <command> |
Détails d'une commande
|
git help |
Liste des commandes
|
git diff |
Affiche les différences entre différents commits ou branches
|
git stash |
Créer une sauvegarde locale mise de côté (hors du projet)
|
git stash list |
Liste toutes les sauvegardes locales existantes
|
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.