5. Rebase

Contents

    Le rebase simple

    Déplace la branche courante sur un commit donné
    git rebase hash
    git rebase master

    On peut aussi spécifier la branche source à la place de la brance courante
    git rebase destination brancheSource

    Changer l'historique en profondeur : le rebase interactif

    Il est nécessaire de spécifier la plage des commits à modifier, comme par exemple :
    git rebase -i HEAD~6

    # p, pick = use commit
    # r, reword = use commit, but edit the commit message
    # e, edit = use commit, but stop for amending
    # s, squash = use commit, but meld into previous commit
    # f, fixup = like "squash", but discard this commit's log message
    # x, exec = run command (the rest of the line) using shell
    # d, drop = remove commit
    #
    # These lines can be re-ordered; they are executed from top to bottom.
    #
    # If you remove a line here THAT COMMIT WILL BE LOST.
    #
    # However, if you remove everything, the rebase will be aborted.
    #
    # Note that empty commits are commented out
    

    Proudly Powered by Zim 0.75.2.

    Template by Etienne Gandrille, based on ZeroFiveEight and using JQuery Toc Plugin.