Thursday, February 24, 2011

[Git] Rebase

So far I have used git rebase for 3 scenarios.
  1. Want to add more change in the commit that is not the last commit of any branch. Use git rebase -i
  2. Want to move whole different branch to base on another branch.
          A---B---C topic
    /
    D---E---F---G master
    to
                  A'--B'--C' topic
    /
    D---E---F---G master
    git checkout <branch-to-move>
    git rebase <base-branch>
  3. Want to move part of different branch to base on another branch.
        o---o---o---o---o  master
    \
    o---o---o---o---o next
    \
    o---o---o topic
    to
    o---o---o---o---o  master
    | \
    | o'--o'--o' topic
    \
    o---o---o---o---o next
    git rebase --onto <new-base-branch> <old-base-branch> <move-branch>


No comments:

Config number of file descriptors on Linux

Check file descriptor limit for a process. Vary depending on owner of the process $ cat /proc/{process-id}/limits Check current number of...