我已将子目录移动到单独的存储库中,然后将其作为子模块包含在内。
现在我想在这个改变之上重新定义另一个分支。
israfel:proj almad$ git rebase -i origin/master
error: could not apply ae1fd9a... Commit message
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' and run 'git rebase --continue'
Could not apply ae1fd9a... Commit message
israfel:proj almad$ git status
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# Unmerged paths:
# (use "git reset HEAD <file>..." to unstage)
# (use "git add/rm <file>..." as appropriate to mark resolution)
#
# added by us: views/docs/examples
#
israfel:proj almad$ git rm -rf views/docs/examples
views/docs/examples: needs merge
rm 'views/docs/examples'
fatal: git rm: 'views/docs/examples': Operation not permitted
israfel:proj almad$ git add views/docs/examples
error: unable to index file views/docs/examples
fatal: updating files failed
israfel:apiary almad$ git rm -rf views/docs/examples
views/docs/examples: needs merge
rm 'views/docs/examples'
fatal: git rm: 'views/docs/examples': Operation not permitted
如何解决此冲突?
答案 0 :(得分:13)
首次调用重置:
git reset views/docs/examples
git rm -rf views/docs/examples