不同git存储库之间的代码传输

时间:2016-06-15 10:33:58

标签: git

我在两个独立的存储库中开发了类似的代码库。代码库的初始版本上传到github。然后,在bitbucket上创建另一个存储库,并将其余的本地更新推送到bitbucket存储库。现在我想做以下事情:

  1. 在GitHub上创建一个新分支。
  2. 将更新从bitbucket存储库推送到Github的新分支。
  3. 最初我更改了远程网址以推送更新。在添加和提交命令之后,我尝试推送,但它不起作用。现在我有以下错误:

    error: commit 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.
    

    任何提示都可以解决冲突并解决问题?

    由于

    在初始提示之后完成以下操作:

    1. git merge --abort。
    2. git add * .h
    3. git add * .cpp
    4. git commit -m“Rep update”
    5. git push origin branch-name
    6. 然后我收到以下错误:

      hint: Updates were rejected because the tip of your current branch is behind
      hint: its remote counterpart. Integrate the remote changes (e.g.
      hint: 'git pull ...') before pushing again.
      hint: See the 'Note about fast-forwards' in 'git push --help' for details.
      

0 个答案:

没有答案