-
Notifications
You must be signed in to change notification settings - Fork 63
FQA
Lingfeng_Ai edited this page Jul 1, 2018
·
1 revision
- 克隆代码到本地
- 查看全部远端分支:
git branch -a
- 切换到远端分支
git checkout #2 origin/\#2-Akin\'s-Laws-of-Spacecraft-Design
git rebase -i <start> <end>
pick 08afee0 创建文章 #把不想要到commit删除,或者把pick改成drop
pick f89746f 补充翻译
pick ea08769 Update Akin's Laws of Spacecraft Design
pick 2a6dae5 Rename Akin's Laws of Spacecraft Design to Akin's Laws of Spacecraft Design.md
# Rebase bc05af1..2a6dae5 onto bc05af1 (4 command(s))
#
# 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 push --force
ps:如果你的commit包含了有用和无用的文件(不是一个良好的commit),那么你不能用上述的方法,请把无用的文件清理掉之后新建一个commit
版权声明:伯乐在线翻译组翻译的译文仅用于学习、研究和交流。版权归伯乐在线、文章作者和译者所有。译文将首发于伯乐在线,转载前请联系译者或管理员获取授权,并在文章开头明显位置注明英文原文、伯乐在线译文链接、译者、校对者,违者必究
友情链接