Skip to content

Instantly share code, notes, and snippets.

@PierreSelim
Last active October 26, 2020 14:00
Show Gist options
  • Save PierreSelim/69db9eb788d14c75fbaa to your computer and use it in GitHub Desktop.
Save PierreSelim/69db9eb788d14c75fbaa to your computer and use it in GitHub Desktop.
gitcheatsheet

Cheat sheet pour git.

Une page interessante à visiter avant https://gist.github.com/aquelito/8596717

Ne pas laisser git gérer vos sauts de ligne

git config --global core.autcrlf false

Historique propre

Pour éviter les commit de merge lié à vos pull:

git config --global pull.rebase true

Branche mergeable ?

Pour tester que vous pourrez merger votre_branche avec master

git checkout master
git merge --no-ff --no-commit votre_branche

Si cela se passe bien, git va vous le dire "Automatic merge went well; stopped before committing as requested". Il ne reste plus qu'à annuler car on faisait juste un test

git merge --abort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment