1. 程式人生 > >git rebase

git rebase

ror mes staging eba 表示 clas his top rop

  1 noop
  2 
  3 # Rebase 3bb2bfb..3bb2bfb onto 3bb2bfb (1 command)
  4 #
  5 # Commands:
  6 # p, pick = use commit
  7 # r, reword = use commit, but edit the commit message
  8 # e, edit = use commit, but stop for amending
  9 # s, squash = use commit, but meld into previous commit
 10 #
f, fixup = like "squash", but discard this commit‘s log message 11 # x, exec = run command (the rest of the line) using shell 12 # d, drop = remove commit 13 # 14 # These lines can be re-ordered; they are executed from top to bottom. 15 # 16 # If you remove a line here THAT COMMIT WILL BE LOST.
17 # 18 # However, if you remove everything, the rebase will be aborted. 19 # 20 # Note that empty commits are commented out ~ ~ ~ ~ ~ ~

這是git rebase任選的文件,前面是系統已有提交將要對git rebase -i ${commitID}中commitID代表的操作進行的下一步修改。上面的內容表示當前分支的最新提交,故所做操作為noop。文件中部分幫助內容在文件下半部分給出。代表的內容是git默認的幫助內容。也是rebase可以進行的操作。

此下為當前分之中較早的一次提交。其中包含了多重操作,若需要對不同分支進行調整,修改pick為對應關鍵詞即可。建議一次一次修改哈~

隨後提交push到遠端時,會對遠端分支進行變基,先前的提交會被修改後的提交覆蓋。

  1 pick 1641665 w2v model utils.
  2 pick 05f81c5 WIP:w2v model train.
  3 pick 67c986e remote maven compile Error fixed.
  4 pick 7af70e6 WIP:remote maven compile Error fixed.
  5 pick d8ad75f WIP:Utils staging.
  6 pick f10875e WIP:word2vec訓練完成,模型生成完成。
  7 pick 45de2bd CLN:代碼引用Utils區分私有包和dataflow公有包。
  8 pick 0d5db19 BUG:Fix set windowSize failure.
  9 pick d267a86 WIP:Export Json result.
 10 pick 3bb2bfb BUG:Fix git pipeline compile Error.
 11 
 12 # Rebase debd030..3bb2bfb onto debd030 (10 commands)
 13 #
 14 # Commands:
 15 # p, pick = use commit
 16 # r, reword = use commit, but edit the commit message
 17 # e, edit = use commit, but stop for amending
 18 # s, squash = use commit, but meld into previous commit
 19 # f, fixup = like "squash", but discard this commit‘s log message
 20 # x, exec = run command (the rest of the line) using shell
 21 # d, drop = remove commit
 22 #
 23 # These lines can be re-ordered; they are executed from top to bottom.
 24 #
 25 # If you remove a line here THAT COMMIT WILL BE LOST.
 26 #
 27 # However, if you remove everything, the rebase will be aborted.
 28 #
 29 # Note that empty commits are commented out
~                                                                                                                                      
~                                                                                                                                      
~        

git rebase