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

Prochaine révision
Révision précédente
tech:notes_git [2025/03/24 15:06] – créée - modification externe 127.0.0.1tech: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+ 
 +== Git grep 
 + 
 +Search the working directory for ''foo()''
 <code bash> <code bash>
-git -c http.sslVerify=false pull +git grep "foo()"
-# ou +
-env GIT_SSL_NO_VERIFY=true git pull+
 </code> </code>
 +
  
 == Branches et merge == Branches et merge
Ligne 482: 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 522: 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 539: Ligne 565:
 fetch --unshallow $URL fetch --unshallow $URL
 </code> </code>
 +
  
 == Python == Python
Ligne 545: Ligne 572:
 * pygit2 * pygit2
  
-<code - reuirements.txt>+''reuirements.txt'' 
 +<code ->
 GitPython GitPython
 </code> </code>
Ligne 598: Ligne 626:
 fatal: ambiguous argument 'preseed/kvm-deb10.cfg': unknown revision or path not in the working tree. fatal: ambiguous argument 'preseed/kvm-deb10.cfg': unknown revision or path not in the working tree.
 Use '--' to separate paths from revisions, like this: Use '--' to separate paths from revisions, like this:
-'git <command> [<revision>...] -- [<code>...]'+'git <command> [<revision>...] -- [<yourcode>...]'
 </code> </code>
 +
  
 ==== Solution ==== Solution
Ligne 606: 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.1742825205.txt.gz · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki