Outils pour utilisateurs

Outils du site


informatique:git

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édentesRévision précédente
Prochaine révision
Révision précédente
informatique:git [2022/11/02 06:07] – [Des alias pour gagner du temps] alexisinformatique:git [2024/02/09 05:47] (Version actuelle) alexis
Ligne 25: Ligne 25:
 git config --global commit.template <filename> # Utilisation d'un modèle de message pour la validation git config --global commit.template <filename> # Utilisation d'un modèle de message pour la validation
 git config --global alias.st 'status' # Création d'un alias de la fonction "status" git config --global alias.st 'status' # Création d'un alias de la fonction "status"
 +git config --global push.autoSetupRemote true # Création automatique de la branche distante au moment du partage (commande "push")
 </code> </code>
  
Ligne 57: Ligne 58:
 [commit] [commit]
         template = <filename>         template = <filename>
 +[push]
 +        autoSetupRemote = true
 </code> </code>
 <WRAP alert> <WRAP alert>
Ligne 104: Ligne 107:
         pt = !git tag -l | xargs git tag -d && git fetch -t         pt = !git tag -l | xargs git tag -d && git fetch -t
         ; Remove local MRs (gitlab)         ; Remove local MRs (gitlab)
-        rmmr = !git checkout master && git branch --list 'mr/*' --format '%(refname:lstrip=2)' | xargs git branch -D+        rmmr = !git reset --hard && git checkout master && git branch --list 'mr/*' --format '%(refname:lstrip=2)' | xargs git branch -D
         ; Show synchronized branches without remote         ; Show synchronized branches without remote
-        stale-branch = !git fetch --all --prune && git branch --verbose | awk '/\[gone\]/ {print $1}'+        stale-branch = !git fetch --all --prune && git branch --verbose | awk '/\\[gone\\]/ {print $1}'
 </code> </code>
 <WRAP info> <WRAP info>
Ligne 614: Ligne 617:
   - [[https://www.atlassian.com/blog/git/tear-apart-repository-git-way|How to tear apart a repository: the Git way - Work Life by Atlassian]]   - [[https://www.atlassian.com/blog/git/tear-apart-repository-git-way|How to tear apart a repository: the Git way - Work Life by Atlassian]]
   - [[https://blog.plover.com/prog/git/tips-2.html|The Universe of Discourse : Things I wish everyone knew about Git (Part II)]]   - [[https://blog.plover.com/prog/git/tips-2.html|The Universe of Discourse : Things I wish everyone knew about Git (Part II)]]
 +  - [Et merde, Git!?!](https://ohshitgit.com/fr)
 +
  
  
informatique/git.1667394427.txt.gz · Dernière modification : 2022/11/02 06:07 de alexis