Tuto git ¶
-
https://github.com/git/git (miroir)
-
Howto make a github pull request by https://fediverse.org/denicmarko
- News
- Definition
- Why
- Installation
- Configuration
-
Git commands
- “..” command, Double Dot Notation
- git add
- git bisect
- git branch
- git cherry-pick
- git clone
- git commit
- git config
- git diff
- git difftool
- git checkout (switch branches or restore working tree files)
- git fetch
- git filter-repo (git 2.24.0+)
- git gc
- git help
- git init
-
git log
- .gitconfig
- How to see your commit history in Git
- How to see log stats in Git
- How to show the commit log as a graph in Git
- git log –follow [fichier]
- git log –author=[auteur]
- git dlog (alias)
- git dlog -p
- git shortlog
- git shortlog -sn –all –no-merges
- git log –graph –oneline –decorate
- git log –pretty=format:”%cn committed %h on %cd”
- git log –graph –pretty=format:’%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset’ –abbrev-commit
- git log –graph –all –decorate –stat –date=iso
- git ls-files
- git merge
- git mv
- Git pull
- git push
- git rebase
- git reflog
- git remote
- git reset
- git restore EXPERIMENTAL (since git 2.23.0 (2019-08-16))
- git revert
- git rm
- git show (Show various types of objects)
- git status
- git stash
- git switch EXPERIMENTAL (since git 2.23 (2019-08-16))
- git tag
- git whatchanged
- git worktree
- Git clients
-
Git tutorials
- Git-scm book + git-scm doc
- Atlassian git tutorial
- codeapi-git by Anton Zhiyanov
- Froggit tutorial par Christophe Chaudier
- fullstackpython git tutorial
- Help github
-
devguide.python.org/gitbootcamp
-
Git Bootcamp and Cheat Sheet
- Forking CPython GitHub Repository
- Cloning a Forked CPython Repository
- Listing the Remote Repositories
- Setting Up Your Name and Email Address
-
Enabling
autocrlf
on Windows - Creating and Switching Branches
- Deleting Branches
- Staging and Committing Files
- Reverting Changes
- Stashing Changes
- Committing Changes
- Pushing Changes
- Creating a Pull Request
- Syncing with Upstream
- Applying a Patch from Mercurial to Git
- Downloading Other’s Patches
- Accepting and Merging a Pull Request
- Backporting Merged Changes
- Editing a Pull Request Prior to Merging
-
Git Bootcamp and Cheat Sheet
-
git flow memo
- git flow memo introduction
-
Basic git flow memo
- Init/clone repository
- Check the state of our local repository
- Change the current working branch
- Update our local branches definition
- Create a new branch
- Merge a branch
- Commit some code
- Modify the previous commit
- Push our code/new branch to the remote repository
- Keep our branch updated : get the remote repository changes
- Cancel our modifications (back to last commit)
- Record our changes and restore them
- Manage tags
- Advanced git flow memo
- realpython git tutorials
- Git shouldn’t be so hard to learn
- Zeste de savoir git
- Zulip git tutorial
-
Formations
- Sogilis
- Delicious insigths
-
Flows/tutorials
-
Flows
- Résumé des commandes git pour travailler sur une branche
- Delicious insights Git tutorial
-
Gitlab flow
- Gitlab articles
- Introduction
- Git flow and its problems
- GitHub flow as a simpler alternative
- Production branch with GitLab flow
- Environment branches with GitLab flow
- Release branches with GitLab flow
- Merge/pull requests with GitLab flow
- Issue tracking with GitLab flow
- Linking and closing issues from merge requests
- Squashing commits with rebase
- Do not order commits with rebase
- Award emojis on issues and merge requests
- Pushing and removing branches
- Committing often and with the right message
- Testing before merging
- Working with feature branches
- Github flow
- Git flow (2010)
-
Exemple de workflow git chez Sogilis
- Et si on en revenait à la question : “un workflow c’est quoi, et ça sert à quoi ? “
- Un workflow doit répondre à nos besoins
- Les objectifs
- Les contraintes
- Le résultat
- En résumé
-
Et en pratique ?
- 1. On suppose qu’on débute une itération, master est propre
- 2. Pour une fonctionnalité donnée, on crée une branche pour bosser dedans
- 3. On développe dans la branche
- 4. S’il est nécessaire de se synchroniser, on rebase
- 5. Fusion dans la branche d’intégration
- 6. Si les tests automatiques ont montré que la fonctionnalité ainsi que la branche integ sont ok, on peut fusionner integ dans master
- 7. On nettoie un peu nos branches, c’est-à-dire qu’on ne garde pas sur le serveur de branches fusionnées et terminées, histoire de garder un ensemble lisible.
-
Flows
- cheatsheets
-
Git Howto
-
Howto make a github pull request
by https://fediverse.org/denicmarko
- Introduction
-
How do you make a pull request ? How to ask the maintainers to merge it ?
- Step 1: Find a project you want to contribute to.
- Step 2: Fork the repository
- Step 3: Clone the repository
- Step 4: Create a new remote for the upstream repository
- Step 5: Create a new branch
- Step 6: Add some code
- Step 7: Commit your changes
- Step 8: Push the changes to your repository
- Step 9: Create a pull request
-
Howto make a github pull request
by https://fediverse.org/denicmarko
- Humor
-
Tools
- bfg-repo-cleaner
- degit (Straightforward project scaffolding)
- gitmoji-cli (A gitmoji interactive command line tool for using emojis on commits)
- Git sizer (2018-03)
- oh_my_zsh plugins
-
pre-commit
: a Python framework for managing and maintaining multi-language pre-commit hooks
- Introduction
- pre-commit installation, .pre-commit-config.yaml
- Makefile
- Articles
- .pre-commit-config.yaml examples
-
List of hooks repos
-
List of
pre-commit
hooks repos
-
Description of some repos
- black repo: https://github.com/ambv/black
- blacken docs repo: https://github.com/asottile/blacken-docs
- giticket repo: https://github.com/milin/giticket
- hooks in repo: https://github.com/pre-commit/pre-commit-hooks
- isort repo: https://github.com/asottile/seed-isort-config
- mypy repo: https://github.com/pre-commit/mirrors-mypy
- prettier repo: https://github.com/pre-commit/mirrors-prettier
- PyCQA/bandit repo: https://github.com/PyCQA/bandit
- reorder_python_imports Rewrites source to reorder python imports
- Ansible repos
- C, files repos
- docker, docker-compose repos
- git, lint repos
- HTML repos
- Makefile repos
- Nodejs, dockerfile repos
- PHP repos
- Python repos
- .rst linter, sphinx repos
- Ruby repos
- SASS repos
- Security, git, ruby, markdown, shells
- RUST repos
- Shell, bash repos
- Terraform, prometheus repos
- Text, regular expressions
- Typescript repos
-
Description of some repos
-
List of
pre-commit
hooks repos
- Vim fugitive
- Git windows tools
- Git Tutorial: 10 Common Git Problems and How to Fix Them
- Dangit
-
Git howto
-
Branches
- What is the status of my branch ?
- How to go the main branch
- How to delete a local and remote branch
- How to discard local file modifications
- How to undo local commits
- How to remove a file from git (git reset, git reset –hard HEAD)
- How to remove a file from git (git rm –cached filename)
- How to delete changes in a file from git (git checkout – filename)
- Writing for a clean history (git rebase)
- Merging versus rebasing
- How to see the big files in a git repo ?
- How to remove big files from a git repo ?
-
Branches
- Migrate from svn to git
- Git SSH access
-
master to main
- Setting the default branch to main
- Opérations
- Update the default repository
- delete the master branch
- Git 2.31.0 (2021-03-15)
- Python 3.11 (2021-03-03) master => main
- gitlab The new Git default branch name Why we’re joining the Git community and updating “master” to “main”
- git How to alias “master” as ‘main’
-
Versions
- git 2.44.0 (2024-02-23)
- git 2.43.0 (2023-11-20)
- git 2.38.0 (2022-10-04)
- git 2.33.0 (2021-08-16)
- git 2.31.0 (2021-03-15) master => main
- git 2.30.0 (2020-12-28)
- git 2.28.0 (2020-07-27) Introducing init.defaultBranch
- git 2.26.0 (2020-03-23)
- git 2.25.0 (2020-01-13)
- git 2.24.0 (2019-11-03)
- git 2.23.0 (2019-08-16)
- git 2.21.0 (2019-02-24)
- git 2.19.0 (2018-09-10)
- git 2.19.0 (2017-05-09) git config Conditional includes