在Git中重新建立基础时,COMMIT将丢失什么?

问题描述 投票:0回答:1
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log message
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# .       create a merge commit using the original merge commit's
# .       message (or the oneline, if no original merge commit was
# .       specified). Use -c <commit> to reword the commit message.
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.

使用提交哈希注释掉行是否与使用DROP关键字相同?我想重新设置我的Pull Request的基础,因此它仅提交了一份提交。

git github rebase git-commit
1个回答
0
投票

是,但是有很小的差异。例如:

rebase.missingCommitsCheck:如果设置为“ warn”,则git rebase -i将在删除某些提交(例如删除一行)时显示警告,但是重新设置仍将继续。如果设置为“错误”,它将打印先前的警告并停止变基,然后可以使用git rebase --edit-todo来更正该错误。如果设置为“忽略”,则不进行检查。要在没有警告或错误的情况下删除提交,请使用待办事项列表中的drop命令。默认为“忽略”。

© www.soinside.com 2019 - 2024. All rights reserved.