Outils pour utilisateurs

Outils du site


tech:notes_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édentesRévision précédente
Prochaine révision
Révision précédente
tech:notes_git [2025/05/26 15:44] Jean-Baptistetech:notes_git [2025/11/11 16:51] (Version actuelle) Jean-Baptiste
Ligne 22: Ligne 22:
  
 Voir : Voir :
 +* https://confluence.atlassian.com/bitbucketserver094/basic-git-commands-1489801692.html?utm_campaign=in-app-help&utm_medium=in-app-help
 * [[https://opensource.com/article/23/1/git-articles|7 Git articles every open source practitioner should read]] * [[https://opensource.com/article/23/1/git-articles|7 Git articles every open source practitioner should read]]
 * https://developers.redhat.com/cheat-sheets/git-cheat-sheet * https://developers.redhat.com/cheat-sheets/git-cheat-sheet
 * Oh My Git! * Oh My Git!
 +* http://bayledes.free.fr/systeme/git.html
  
 Git Git
Ligne 97: Ligne 99:
 git push -f git push -f
 </code> </code>
 +
  
 === check before git push === check before git push
Ligne 131: Ligne 134:
 == Configurer son environnement == Configurer son environnement
  
-<code bash ~/.bashrc>+''~/.bashrc'' 
 +<code bash>
 export PS1='\u@\h:\w$(__git_ps1) \$ ' export PS1='\u@\h:\w$(__git_ps1) \$ '
 export GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWSTASHSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1 export GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWSTASHSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1
Ligne 152: Ligne 156:
 git push -u origin master git push -u origin master
 </code> </code>
 +
  
 == Push an existing repository from the command line == Push an existing repository from the command line
Ligne 168: Ligne 173:
 </code> </code>
  
-Ne pas vérifier le certificat HTTPS 
-<code bash> 
-git -c http.sslVerify=false pull 
-# ou 
-env GIT_SSL_NO_VERIFY=true git pull 
-</code> 
  
 +== Git grep
  
-Ajouter un certificat+Search the working directory for ''foo()''
 <code bash> <code bash>
-# Récupérer le certificat racine +git grep "foo()"
-openssl s_client -showcerts -connect git.acme.fr:443 -servername git.acme.fr </dev/null 2>/dev/null | openssl x509 -outform PEM >~/.acme_root_ca.pem +
- +
-# Tester : +
-curl --cacert ~/.acme_root_ca.pem -I https://git.acme.fr +
- +
-# Ajouter la nouvelle CA : +
-git config --global http.sslCAInfo /home/monuser/.acme_root_ca.pem+
 </code> </code>
  
Ligne 496: Ligne 489:
 git merge master git merge master
 </code> </code>
 +
  
 === submodule === submodule
  
 Voir  Voir 
-https://delicious-insights.com/fr/articles/git-submodules/ +* https://www.hexotech.fr/blog/le-blog-hexotech-2/comment-gerer-efficacement-un-projet-multi-depot-git-123 
-[[https://gauthier.frama.io/post/git-subtree/|Git subtree: une alternative à Git submodule]]+https://delicious-insights.com/fr/articles/git-submodules/ 
 +[[https://gauthier.frama.io/post/git-subtree/|Git subtree: une alternative à Git submodule]]
  
 <code bash> <code bash>
Ligne 536: Ligne 531:
 Avec Gitlab CI Avec Gitlab CI
 Voir : https://docs.gitlab.com/ee/ci/git_submodules.html Voir : https://docs.gitlab.com/ee/ci/git_submodules.html
-<code yaml .gitlab-ci.yml>+ 
 +''.gitlab-ci.yml'' 
 +<code yaml>
 variables: variables:
   GIT_SUBMODULE_STRATEGY: recursive   GIT_SUBMODULE_STRATEGY: recursive
 </code> </code>
 +
 +
 +== Diagnostique
 +
 +<code bash>
 +export GIT_TRACE=2
 +export GIT_CURL_VERBOSE=2
 +export GIT_TRACE_PERFORMANCE=2
 +export GIT_TRACE_PACK_ACCESS=2
 +export GIT_TRACE_PACKET=2
 +export GIT_TRACE_PACKFILE=2
 +export GIT_TRACE_SETUP=2
 +export GIT_TRACE_SHALLOW=2
 +</code>
 +
  
 == Autres == Autres
Ligne 553: Ligne 565:
 fetch --unshallow $URL fetch --unshallow $URL
 </code> </code>
 +
  
 == Python == Python
Ligne 559: Ligne 572:
 * pygit2 * pygit2
  
-<code - reuirements.txt>+''reuirements.txt'' 
 +<code ->
 GitPython GitPython
 </code> </code>
Ligne 614: Ligne 628:
 'git <command> [<revision>...] -- [<yourcode>...]' 'git <command> [<revision>...] -- [<yourcode>...]'
 </code> </code>
 +
  
 ==== Solution ==== Solution
Ligne 620: Ligne 635:
 git checkout HEAD -- vars/kvm-deb10.var preseed/kvm-deb10.cfg git checkout HEAD -- vars/kvm-deb10.var preseed/kvm-deb10.cfg
 </code> </code>
 +
  
 === Pb git diff et git difftool ne fonctionne pas === Pb git diff et git difftool ne fonctionne pas
tech/notes_git.1748267082.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki