• [^] # Re: git stash ?

    Posté par . En réponse au journal Un petit script pour sauvegarder rapidement un fichier. Évalué à 1. Dernière modification le 24 mars 2013 à 11:34.

    Allez, puisqu'on y est, je propose aussi une solution avec la syntaxe qs truc.txt

    #!/bin/bash
    git checkout -b `date +"tmp_%Y%m%d_%H%M%S"` && git add 1ドル && git commit -m temporary && git checkout -
    
    

    Ce qui va créer une branche tmp_<date>, y ajouter le fichier passé en paramètre, commiter, et revenir sur la branche précédente.

    Hassan Céhef