# Rebase 648f34f..1c643ca onto 648f34f (3 commands) # # Commands: # 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
$ git log commit 2d174dcd1cb501fc2e09e0ab49b5d654489334bc (HEAD -> v0.1, origin/v0.1) Author: Janko <shuaijinchao@gmail.com> Date: Sat Aug 1 14:24:32 2020 +0800
add merge.txt
执行合并
1 2
$ git checkout v0.1 $ git rebase origin/master
查看提交记录。
1 2 3 4 5 6 7 8 9 10 11 12
git log commit 98d2d7623625eca2ea9fba949b78225ce2e9ddfe (HEAD -> v0.7) Author: Janko <shuaijinchao@gmail.com> Date: Sat Aug 1 14:24:32 2020 +0800
add merge.txt
commit 050cf5c8fa4ae3d99aa87381307696a19d785c9e (origin/master, origin/HEAD, master) Author: Janko <shuaijinchao@gmail.com> Date: Sat Aug 1 14:17:42 2020 +0800