• [^] # Re: Du gitcode à partager - ou pas

    Posté par . En réponse au lien « Et merde, Git!?! ». Évalué à 4.

    Ah oui ! Je vois. C'est super cool.

    Je viens d'essayer du coup ça marche bien avec des noms plus simples.

    Au lieu de :

    # Fetch from upstream
    git fetch upstream
    # get hash of upstream/master
    hash="$(git rev-parse upstream/master)"
    # update 'master' without doing a checkout
    git push . "$hash:refs/heads/master"

    Je peux faire :

    # Fetch from upstream
    git fetch upstream
    # update 'master' without doing a checkout
    git push . upstream/master:master

    Merci beaucoup pour l'astuce !

    https://linuxfr.org/users/barmic/journaux/y-en-a-marre-de-ce-gros-troll