Outils pour utilisateurs

Outils du site


divers:git

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
divers:git [2022/03/03 06:19]
marclebrun [Clone]
— (Version actuelle)
Ligne 1: Ligne 1:
-====== GIT ====== 
- 
-| [[https://​git-scm.com/​docs ​                                               |Git Reference]] || 
-| [[https://​git-scm.com/​docs/​gittutorial ​                                   |Git Tutorial ]] || 
-| [[https://​git-scm.com/​book/​en/​v2 ​                                         |Git Book     ]] | [[https://​git-scm.com/​book/​en/​v2/​Git-Branching-Basic-Branching-and-Merging|Git Book - Basic Branching and Merging]] | 
-| [[https://​guides.github.com/​activities/​hello-world/ ​                      ​|GitHub Guide ]] || 
- 
-  * [[divers:​git:​installation_configuration]] 
-  * [[divers:​git:​commandes]] 
-  * [[divers:​git:​utiliser_meld_avec_git]] 
-  * [[divers:​git:​gitignore_lazarus]] 
-  * [[divers:​git:​gitignore_python]] 
-  * [[https://​github.com/​github/​gitignore|GitHub - A collection of .gitignore templates]] 
- 
-  * [[divers:​git:​workflow]] 
-  * [[divers:​git:​commit_messages]] 
- 
-  * [[https://​www.youtube.com/​watch?​v=0SJCYPsef54 |Advanced Git Tutorial - YouTube ]] 
-  * [[https://​www.youtube.com/​watch?​v=__cR7uPBOIk | A Step by Step Guide for How to Resolve Git Merge Conflicts - YouTube]] 
-  * [[https://​www.atlassian.com/​fr/​git/​tutorials/​undoing-changes|Annulation des changements | Atlassian Git Tutorial]] 
-  * [[https://​devconnected.com/​how-to-git-reset-to-head/​|How To Git Reset to HEAD]] 
- 
-  * [[divers:​git:​browser_older_version]] 
- 
-===== GitLab ===== 
- 
-  * [[divers:​git:​gitlab_ssh_key]] 
- 
-===== Serveur privé ===== 
- 
-  * [[divers:​git:​depots_sur_serveur_prive]] 
-  * [[https://​www.linux.com/​training-tutorials/​how-run-your-own-git-server/​|How to Run Your Own Git Server]] 
- 
-===== Ligne de commande ===== 
- 
-^ Commit ^^ 
-| Ajouter nouveaux fichiers ​         | ''​git add --all'' ​             | 
-| Status ​                            | ''​git status'' ​                | 
-| Commit ​                            | ''​git commit -m "​Message..."''​ | 
-| Log                                | ''​git log'' ​                   | 
-| Modifs depuis dernier commit ​      | ''​git diff'' ​                  | 
-| Revenir à l'​état du dernier commit | ''​git reset --hard <​commit>'' ​ | 
-| Enlever un fichier du dépôt (sans l'​effacer) | ''​git rm --cached monfichier.txt ''​ | 
-| Enlever un dossier du dépôt (sans l'​effacer) | ''​git rm --cached -r mondossier/ ''​ | 
-^ Annulation des changements ^^ 
-| Annuler les derniers changements faits en local | ''​git checkout .''​ | 
-| Annuler les derniers changements (revenir au dernier commit) [[https://​www.atlassian.com/​fr/​git/​tutorials/​undoing-changes/​git-reset|Doc1]] [[https://​devconnected.com/​how-to-git-reset-to-head/​|Doc2]] | ''​git reset --hard HEAD''​ | 
-^ Branches ^^ 
-| Créer une nouvelle branche ​        | ''​git branch <​branche>'' ​                | 
-| Lister les branches ​               | ''​git branch --list'' ​                   | 
-| Switcher vers une branche ​         | ''​git checkout <​branche>'' ​              | 
-| Créer et Switcher en une opération | ''​git checkout -b <​branche>'' ​           | 
-| Supprimer une branche ​             | ''​git branch -d <​branche>'' ​             | 
-| Supprimer une branche distante ​    | ''​git push <​remote>​ --delete <​branche>''​ | 
-^ Merge ^^ 
-| Merger une branche avec la branche en cours | ''​git merge <​branche>'' ​        | 
-^ Dépôts ^^ 
-| Voir les dépôts distants ​         | ''​git remote -v'' ​                            | 
-| Voir les détails d'un dépôt ​      | ''​git remote show <​nom_depot>'' ​              | 
-| Renommer un dépôt ​                | ''​git remote rename <​ancien>​ <​nouveau>'' ​     | 
-| Modifier un dépôt ​                | ''​git remote set-url <​nom_depot>​ <​nouv_url>''​ | 
-| Supprimer un dépôt ​               | ''​git remote rm <​nom_depot>'' ​                | 
-| Envoyer les modifs vers dépôt ​    | ''​git push <​nom_depot>​ master'' ​              | 
-| Recevoir les modifs depuis dépôt ​ | ''​git pull <​nom_depot>​ master'' ​              | 
-^ Dépôt distant privé ^^ 
-| Ajouter un dépôt via **SSH** ​                | ''​git remote add <​nom_depot>​ [[ssh://​git@SERVEUR/​home/​git/​monprojet.git]]'' ​         | 
-| Recréer (cloner) depuis un dépôt via **SSH** | ''​git clone git@SERVEUR:/​home/​git/​monprojet.git''​ (s'​ajoute comme dépôt **origin**) | 
- 
-==== Init ==== 
- 
-Initialiser un nouveau dossier de travail 
-  * Dossier de travail local : ''​git init''​ 
-  * Dépôt distant : ''​git init --bare''​ 
- 
-==== Remote ==== 
- 
-**Serveur privé** 
- 
-Ajouter un dépôt via **SSH** 
- 
-<code bash> 
-git remote add <​nom_depot>​ ssh://​git@SERVEUR/​home/​git/​monprojet.git 
-</​code>​ 
- 
-**GitHub** 
- 
-Ajouter un dépôt GitHub existant 
- 
-<code bash> 
-git remote add origin https://​github.com/​marclebrun/​monprojet.git 
-</​code>​ 
- 
-==== Push ==== 
- 
-  *  
- 
-==== Pull ==== 
- 
-  *  
- 
-==== Clone ==== 
- 
-**Dépôt local** 
- 
-Cloner depuis un dépôt local 
- 
-<code bash> 
-git clone /​path/​to/​repository/​MyProject 
-git clone "/​C:/​Users/​marc.lebrun/​MyProject"​ 
-</​code>​ 
- 
-Le nouveau dossier **MyProject** est créé dans le dossier où on se trouve. 
- 
-**Serveur privé** 
- 
-Cloner depuis un dépôt distant via **SSH** 
- 
-<code bash> 
-git clone git@SERVEUR:/​home/​git/​monprojet.git 
-</​code>​ 
- 
-S'​ajoute comme dépôt **origin** 
- 
-**GitHub** 
- 
-Cloner depuis GitHub via **HTTPS** 
- 
-<code bash> 
-git clone https://​github.com/​marclebrun/​monprojet.git 
-</​code>​ 
- 
-Cloner depuis GitHub via **SSH** 
- 
-<code bash> 
-git clone git@github.com:​marclebrun/​monprojet.git 
-</​code>​ 
- 
- 
-===== GUI (Interface Graphique) ===== 
- 
-  * Lancer l'​interface graphique 
-    * ''​git gui''​ 
-  * Afficher l'​historique des commits 
-    * ''​gitk''​ 
- 
  
divers/git.1646288390.txt.gz · Dernière modification: 2022/03/03 06:19 par marclebrun