所以我正在尝试使用http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html中的说明拆分提交
尝试搜索“SPLITTING COMMITS”
在那里它说“用“编辑”动作标记你想要拆分的提交。“
我该怎么做
当我执行 git rebase -i 它打开一个文件
# 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
#
# 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
...
我究竟如何从该对话框执行这些命令
编辑
所以我设法成功地变基并致力于我的本地回购......
问题是,当我尝试推送时,我收到错误消息:
! [rejected] JJ-4322 -> JJ-4322 (non-fast-forward)
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'url.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
有任何想法吗?