Outils pour utilisateurs

Outils du site


gestion_configuration:git:toc

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édentesRévision précédente
Prochaine révision
Révision précédente
gestion_configuration:git:toc [2019/09/10 02:43] – [Git] sgariepygestion_configuration:git:toc [2023/10/03 21:44] (Version actuelle) – [Outils] sgariepy
Ligne 54: Ligne 54:
  
   $ git config --global core.safecrlf false   $ git config --global core.safecrlf false
 +
 +==== Config sous Windows ====
 +
 +
 +<code>
 +[user]
 + name = Stephane Gariepy
 + email = sgariepy@emailinexistant.ca
 +[credential]
 + helper = !'C:\\Users\\gariepy\\AppData\\Roaming\\GitCredStore\\git-credential-winstore.exe'
 +[core]
 + excludesfile = C:\\Users\\gariepy\\Documents\\gitignore_global.txt
 +[push]
 + default = simple
 +
 +[http]
 +    sslVerify = false
 +    sslCAinfo = /bin/curl-ca-bundle.crt
 +</code>
 +
 +
 +
 +
 +
 ====== Configurer ====== ====== Configurer ======
  
Ligne 62: Ligne 86:
  
 ===== Globale ===== ===== Globale =====
 +
 +Note: Utiliser les identities
  
  
 Ouvrir le **Terminal** et taper : Ouvrir le **Terminal** et taper :
 +
 <code> <code>
 $ git config --global user.name "<votre nom>" $ git config --global user.name "<votre nom>"
 $ git config --global user.email <votre_email> $ git config --global user.email <votre_email>
 </code> </code>
 +
 +Pour enlever la configuration de l'utilisateur:
 +
 +<code>
 +git config --global --unset user.name
 +git config --global --unset user.email
 +git config --global --unset user.signingkey
 +</code>
 +
  
 Pour configurer d'autres valeurs, qui ne sont pas obligatoire aux fonctionnement de Git : Pour configurer d'autres valeurs, qui ne sont pas obligatoire aux fonctionnement de Git :
 +
 <code> <code>
-$ git config --global core.editor emacs+$ git config --global core.editor nano
 $ git config --global merge.tool vimdiff $ git config --global merge.tool vimdiff
 </code> </code>
 +
 +Rebase editor:
 +
 +<code>
 +$ npm i -g rebase-editor
 +$ git config --global sequence.editor rebase-editor
 +</code>
 +
 +
 +==== Identities ====
 +
 +Ajouter une identité (key-pair):
 +
 +  $ gpg --full-gen-key
 +
 +Liste des key-pairs:
 +
 +  $ gpg --list-secret-keys --keyid-format LONG
 +
 +Export public key:
 +
 +  $ gpg --armor --export [keyid]
 +
 +Delete key-pair:
 +
 +  $ gpg --delete-secret-key [keyid]
 +
 +
 +Ajout d'une identité (remplacer ''gitlab'' par ce qui est approprié):
 +
 +  $ git config --global user.gitlab.name "Your Name"
 +  $ git config --global user.gitlab.email "gitlab@example.com"
 +  $ git config --global user.gitlab.signingkey 543166183AE7043A
 +
 +Liste des identités de Git:
 +
 +  $ nano ~/.gitconfig
 +
 +Source: [[https://www.micah.soy/posts/setting-up-git-identities/|Setting Up Git Identities]]
  
 ===== Configuration spécifique au dépôt ===== ===== Configuration spécifique au dépôt =====
Ligne 201: Ligne 277:
  
  
 +
 +
 +
 +====== GitHub ======
 +
 +Gestion des clés pour plusieurs comptes:
 +
 +  $ ssh-keygen -t rsa -C "your_email@youremail.com"
 +
 +
 +Par exemple, deux clés de créés:
 +
 +  ~/.ssh/id_rsa_activehacker
 +  ~/.ssh/id_rsa_jexchan
 +
 +
 +Ajouter :
 +
 +  $ ssh-add ~/.ssh/id_rsa_activehacker
 +  $ ssh-add ~/.ssh/id_rsa_jexchan
 +
 +
 +Source: [[https://gist.github.com/jexchan/2351996|Multiple SSH Keys settings for different github account]]
 +
 +
 +
 +====== Git Hooks ======
 +
 +
 +<code javascript>
 +{
 +    "name": "project-name",
 +    "version": "1.0.0",
 +    "dependencies": {
 +
 +    },
 +    "scripts": {
 +        "postinstall": ".\\hooks\\postinstall.bat"
 +    }
 +}
 +</code>
 +
 +
 +<code>
 +[core]
 +    hooksPath=../hooks/
 +</code>
 +
 +
 +
 +
 +
 +====== Raccourcis Git ======
 +
 +Ce sont les raccourcis les plus utiles pour le [[https://github.com/robbyrussell/oh-my-zsh/wiki/Plugin:git|plugin Git de Zsh]].
 +
 +  * {{ :gestion_configuration:git:git-shortcuts.pdf |Fichier PDF}}
 +  * {{ :gestion_configuration:git:git-shortcuts.zip |Fichier Publisher 2016 source}}, {{ :gestion_configuration:git:git-shortcuts_2.zip |Version 2}}
  
 ====== Outils ====== ====== Outils ======
Ligne 216: Ligne 350:
   * [[https://drewdevault.com/2019/02/25/Using-git-with-discipline.html|Tips for a disciplined git workflow]]   * [[https://drewdevault.com/2019/02/25/Using-git-with-discipline.html|Tips for a disciplined git workflow]]
   * [[https://www.bennadel.com/blog/3587-my-opinionated-git-cheat-sheet.htm|My Opinionated git Cheat Sheet]]   * [[https://www.bennadel.com/blog/3587-my-opinionated-git-cheat-sheet.htm|My Opinionated git Cheat Sheet]]
 +  * [[https://www.smashingmagazine.com/make-life-easier-when-using-git/|How To Make Life Easier When Using Git]]
gestion_configuration/git/toc.1568076238.txt.gz · Dernière modification : 2022/02/02 00:43 (modification externe)