当一个分支的一个拉取请求被拒绝时,如何将单个文件的版本从一个git分支复制到另一个分支?

时间:2019-07-12 09:02:15

标签: git git-pull

我创建了一个分支A,然后将代码推送到分支A,同时我们知道分支A不是正确的分支,我需要将代码推送到另一个分支B,而我的拉取请求已被拒绝。我已经尝试过以下git命令。

git stash "Branch A Data"
git fetch && git checkout Branch B
git pull
git stash pop

我在这里遇到错误:

error: Pulling is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.

请帮助或建议我另一种方法。

0 个答案:

没有答案