git pull --rebase

后端 未结 3 1709
时光取名叫无心
时光取名叫无心 2021-02-14 18:35

Start situation (no unpushed changes, > indicates the current branch):

o C [> master][origin/master]
|
o B
|
o A
|
...

After

3条回答
  •  梦毁少年i
    2021-02-14 18:50

    git pull --rebase is similar to what the following would do:

    git fetch
    git rebase
    

    So in your case it will leave the repository like this:

    o C [> master]
    |
    o B
    |
    o E [origin/master]
    |
    o C'
    |
    o B'
    |
    o D
    |
    o A
    |
    ...
    

    Note that the two commits you have are different from origin where re-created on top of commit E.

提交回复
热议问题