我正在主分支上,我执行了rebase -i <my_branch>
得到了这个:
noop
# Rebase c947bec..7e259d3 onto c947bec
#
# 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 <cmd>, exec <cmd> = Run a shell command <cmd>, and stop if it fails
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
我想挑选一些提交记录而不是全部,因为其中一些提交记录是不需要的。
此外,当您想将某些文件或更改始终保留在某个分支“本地”时,如何处理?是否有类似于.gitignore
的帮助程序?
HEAD~*
语法对我有效,但第一个则不行。 - Dev Yego