« Git/Améliorer sa productivité en configurant Git » : différence entre les versions

Contenu supprimé Contenu ajouté
 
Ligne 38 :
 
* Exemple pour afficher les logs à un certain format :
<syntaxhighlight lang="bash">
[alias]
lg = log --graph --all --decorate
Ligne 50 :
 
* Retrouver la branche d'un commit en le plaçant en paramètre $1 ('''''P'''ull '''R'''equest''). Ex : <code>git pr 0eccb68</code><ref>https://coderwall.com/p/kxb7kg/find-a-pull-request-given-the-commit-sha</ref> :
<syntaxhighlight lang="bash">
[alias]
pr = "!f() { git log --merges --ancestry-path --oneline $1..master | grep 'pull request' | tail -n1 | awk '{ print $5 }'; }; f"
Ligne 56 :
 
* Ouvrir les fichiers modifiés sur une branche dans un IDE (par exemple pour reprendre le travail après un checkout) :
<syntaxhighlight lang="bash">
[alias]
openfiles = !sh -c 'git show --pretty= --name-only | grep / | xargs /opt/PhpStorm-182.4129.45/bin/phpstorm.sh'