git:accueil

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
git:accueil [2024/04/20 18:08] – [Git] add link phswgit:accueil [2025/10/26 23:04] (Version actuelle) – [Git] add link phsw
Ligne 19: Ligne 19:
   * [[https://blog.scottlowe.org/2023/12/15/conditional-git-configuration/|Conditional Git Configuration]]   * [[https://blog.scottlowe.org/2023/12/15/conditional-git-configuration/|Conditional Git Configuration]]
   * [[https://lucasoshiro.github.io/posts-en/2023-02-13-git-debug/|Git as debugging tool]]   * [[https://lucasoshiro.github.io/posts-en/2023-02-13-git-debug/|Git as debugging tool]]
 +  * [[https://jvns.ca/blog/2024/02/16/popular-git-config-options/|Popular git config options]]
 +  * [[https://blog.gitbutler.com/git-tips-3-really-large-repositories/|Git Tips 3: Really Large Repositories]]
 +  * [[https://adamj.eu/tech/2024/09/02/git-avoid-reset-hard-use-keep/|Git: avoid reset --hard, use reset --keep instead]]
 +  * [[https://github.com/k88hudson/git-flight-rules|Flight rules for Git]]
 +  * [[https://blog.shevarezo.fr/post/2025/03/12/git-sparse-checkout|Gérer efficacement vos dépôts avec git sparse-checkout]]
 +  * [[https://refactoringenglish.com/chapters/commit-messages/|How to Write Useful Commit Messages]]
 +  * [[https://www.chiark.greenend.org.uk/~sgtatham/quasiblog/git-no-forge/|Git without a forge]]
 +  * [[https://blog.gitbutler.com/how-git-core-devs-configure-git/|How Core Git Developers Configure Git]]
 +  * [[https://maurycyz.com/misc/easy_git/|You already have a git server]]
  
  
Ligne 28: Ligne 37:
   * [[https://blog.meain.io/2023/what-is-in-dot-git/|What is in that .git directory?]]   * [[https://blog.meain.io/2023/what-is-in-dot-git/|What is in that .git directory?]]
   * [[https://jvns.ca/blog/2023/09/14/in-a-git-repository--where-do-your-files-live-/|In a git repository, where do your files live?]]   * [[https://jvns.ca/blog/2023/09/14/in-a-git-repository--where-do-your-files-live-/|In a git repository, where do your files live?]]
 +  * [[https://avestura.dev/blog/creating-a-git-commit-the-hard-way|Creating a Git commit: The Hard Way]]
 +  * [[https://blog.brachiosoft.com/en/posts/git/|A Git story: Not so fun this time]]
 +  * [[https://blog.gitbutler.com/20-years-of-git/|20 years of Git. Still weird, still wonderful.]]
  
  
Ligne 206: Ligne 218:
 </code> </code>
  
 +
 +=== Scinder un (ancien) commit en plusieurs commits ===
 +
 +[[https://stackoverflow.com/questions/6217156/break-a-previous-commit-into-multiple-commits|Source]]
 +
 +<code bash>
 +git rebase -i ${commit_avant}
 +# edit le commit à scinder
 +git reset HEAD~
 +# faire tous les commits souhaités (git add / git commit)
 +git rebase --continue
 +</code>
  
  
Ligne 217: Ligne 241:
  
  
 +==== Shallow clone ====
 +
 +<code bash>
 +git clone --depth 1 ...
 +</code>
 +
 +Passer ensuite sur une autre branche distante ([[https://stackoverflow.com/questions/23708231/git-shallow-clone-clone-depth-misses-remote-branches|source]]) :
 +<code bash>
 +git remote set-branches origin '*'
 +git fetch --depth=1
 +git checkout $branch
 +</code>
  
  
Ligne 512: Ligne 548:
 git show branche:fichier > fichier git show branche:fichier > fichier
 git restore -s branche fichier git restore -s branche fichier
 +</code>
 +
 +
 +==== Récupérer un fichier supprimé dans un commit ====
 +
 +[[https://stackoverflow.com/questions/953481/how-do-i-find-and-restore-a-deleted-file-in-a-git-repository|Source]]
 +<code bash>
 +git checkout <deleting_commit>^ -- <file_path>
 </code> </code>
  
Ligne 668: Ligne 712:
  
 <code bash> <code bash>
-GIT_TRACE=true GIT_CURL_VERBOSE=true GIT_SSH_COMMAND="ssh -vvv" git fetch+time GIT_TRACE=true GIT_CURL_VERBOSE=true GIT_SSH_COMMAND="ssh -vvv" GIT_TRACE_PACK_ACCESS=true GIT_TRACE_PACKET=true GIT_TRACE_PACKFILE=true GIT_TRACE_PERFORMANCE=true GIT_TRACE_SETUP=true GIT_TRACE_SHALLOW=true git pull
 </code> </code>
  
  • git/accueil.1713629312.txt.gz
  • Dernière modification : 2024/04/20 18:08
  • de phsw